gospelsite.blogg.se

Twilio messaging api
Twilio messaging api





twilio messaging api

However you handle your authorization tokens, keep them secure, and never add them to source control. If you quit your terminal, you will need to recreate them. These variables will persist for as long as your Bash session remains alive. Do not copy them, and be sure to use the tokens associated with your account instead.ĬOURIER_AUTH_TOKEN="YpW2yEaMDyNg6agN9yGkc9ycEg8MxiKVTiiu2WVc8"ĬOURIER_NOTIFICATION_ID="YpW2yEaMDyNg6agN9yGkc9ycEg8" In a Bash terminal, you can add the variables by typing VARIABLE_NAME="". Click the gear icon next to the Notification's name to reveal them.Īs a best practice, let's assign these values to environment variables. The authorization token and event values are the "Auth Token" and "Notification ID" we see in the detail view of our “Test Appointment Reminder” event. The Courier Send API also requires an event. We must send an Authorization header with each request. You can read more about authorization in Courier's "Authorization Overview". For this tutorial, we will use token authorization.

twilio messaging api twilio messaging api

Authorization ​Ĭourier supports both basic and token authorization.

#TWILIO MESSAGING API CODE#

For additional code samples, see the "Courier API Reference". You can also use an API testing tool such as Postman or Insomnia. For this tutorial, we will send our messages with cURL, but you can use your preferred language and HTTP library. When you are finished, click Publish in the upper right corner and give it a Publish Message of "Initial notification." Send a Message ​Ĭourier passes messages to Integrations via the Send endpoint.







Twilio messaging api