Below are the steps for integrating any Channel with Yellow Messenger Bots via Webhook.
Steps for setting the route for Webhook in Controller. a. In the Webhook send the channel access token as a param. b. Check the message signature if the channel support that (Optional). c. Check if the reply is to be send in the same response (Async or Sync Calls).
Open the Messaging API for the channel and figure out the message types you can support .
Write the Routes for the different message types in the Controller.
When you will get a event in the webhook route you will get a token which will be used for the sending the reply so store it in the message data.
Do the necessary changes for the different message types in executor for the sending the reply back(In the message object store the channel access token and reply token(It can sender id or reply token or something else)).
Test all the message types supported before pushing the changes.
For quick Replies and Cards check the number of actions or cards limit and send the reply accordingly.
Message Types to Check
- Text Message
- Image Message
- Video Message
- Audio Message
- Cards(Carousel) Message
- Quick Replies
- WebView (Only supported in Yellow Messenger)