Menu

How do webhooks work with the Messages and Dispatch APIs?


Question

  • Where are my Messages and Dispatch API status messages sent?
  • What do I set my webhook for the Messages and Dispatch APIs? 
  • How do I get my WhatsApp Callbacks? 
  • How do I get my Facebook Messenger Callbacks? 
  • How do I get my MMS Callbacks? 

Answer

For your Messages API or Dispatch API outbound requests, you can either use Base64 or JWTs for authentication. The authentication type you use in your API request determines what webhook is used by our platform to send message status updates.

  • If you use JWT, then the webhook used will be the "Status URL" webhook set on the Nexmo Application you utilized to create your JWT.
  • If you use Base Auth, then the webhook used will be the one set on your Nexmo account on the customer dashboard

Inbound messages using the Messages API would use the Inbound URL webhook based on the following scenarios:

  • When Chat App Channels (Whatsapp/ Facebook Messenger/ Viber) or Nexmo Virtual Numbers (for SMS via Messages API) are linked with the Nexmo Application, the Inbound Webhook defined in the Application would be used to receive the messages
  • Otherwise, the Inbound Webhook set on the Nexmo Account on the Customer Dashboard would be used. 
Was this article helpful?
2 out of 2 found this helpful
Follow
Have more questions? Submit a request