Created
January 20, 2023 23:32
-
-
Save ahembree/44da6c2d58611a170ac3f795660c8ef6 to your computer and use it in GitHub Desktop.
Use this script to easily verify a Slack event listener URL in a Lambda function
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Use this script to easily verify a Slack event listener URL in a Lambda function. | |
| import json | |
| def lambda_handler(event, context): | |
| loaded_body = json.loads(event['body']) | |
| challenge = loaded_body['challenge'] | |
| return { | |
| 'statusCode': 200, | |
| 'body': challenge | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment