Skip to Content
Learn AWS Serverless Computing
book

Learn AWS Serverless Computing

by Scott Patterson
December 2019
Intermediate to advanced
382 pages
9h 43m
English
Packt Publishing
Content preview from Learn AWS Serverless Computing

Connecting our bot to Slack

Back in the Slack console, under the Event Subscriptions page, we will add the endpoint of our chatbot API to the Request URL field. In the following, you can see we are receiving a 500 error:

Adding a request URL resulting in an error

This happens because, when we subscribe to events, Slack will send a URL verification object to the request URL. Our code doesn't cater for this yet, so we need to add that as a feature. The object that Slack sends for verification looks like this:

{    "token":"GveYU40cwJ3NPGNM4MnVYHEe",    "challenge":"Bo0A0QRp5Z7lUILCWfIA284rCQ32cyAkfADRyVNQRopVb2HIutgv",    "type":"url_verification"}
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Practical Amazon EC2, SQS, Kinesis, and S3: A Hands-On Approach to AWS

Practical Amazon EC2, SQS, Kinesis, and S3: A Hands-On Approach to AWS

Sunil Gulabani

Publisher Resources

ISBN: 9781789958355