-
-
Save KyMidd/9254fb98e4a95f4bb408f5a18af7ec90 to your computer and use it in GitHub Desktop.
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
| def lambda_handler(event, context): | |
| """ | |
| Receives Slack events, performs basic validation, and asynchronously invokes the processor Lambda | |
| """ | |
| print("Received event: %s", json.dumps(event)) | |
| try: | |
| # Parse the event body | |
| body = json.loads(event['body']) | |
| # Handle Slack URL verification challenge | |
| if 'challenge' in body: | |
| return { | |
| 'statusCode': 200, | |
| 'body': json.dumps({'challenge': body['challenge']}) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment