This guide helps to get you up and running with the Sakari SMS API within 5 minutes. You’ll learn how to authenticate your application so you can call our API’s as well as send your first SMS message. What You’ll Need.
Our API’s are protected by OAuth V2. OAuth V2 is a industry standard for authenticating when using API’s. Sakari provides you with a client id and secret which can be exchanged for a JWT which can then be used to call our API’s.
/oauth2/token
endpointcurl -X POST \ https://api.sakari.io/oauth2/token \
-H 'Content-Type: application/json' \
-d '{
"grant_type": "client_credentials",
"client_id": "%CLIENT_ID%",
"client_secret": "%CLIENT_SECRET%"
}'
There is one simple API call which you can use to send one message or a thousand messages. This API has the following parameters:
/v1/accounts/%ACCOUNT_ID%/messages
endpoint. Ensure you replace the placeholders for %ACCOUNT_ID%, %ACCESS_TOKEN% and %MOBILE_NUMBER%curl -X POST \ https://api.sakari.io/v1/accounts/%ACCOUNT_ID%/messages \
-H 'Authorization: bearer %ACCESS_TOKEN% \
-H 'Content-Type: application/json' \
-d '{
"contacts": [{ "mobile": {"number": "%MOBILE_NUMBER%"}}],
"template": "Congratulations! You have sent your first text message"
}'
Within a few seconds, you should receive a message to the number specified.
This is just tiny piece of what our API platform at Sakari has to offer. Check out our other blog posts which will show you how to use templates to send customized messages to each contact or how to schedule messages to be sent at a later time or on a reoccurring schedule.
Ready to transform the way you communicate with your customers? Start your 14-day free trial with Sakari today and experience the power of seamless SMS messaging at your fingertips.
No credit card required, just immediate access to all the tools you need to enhance engagement and drive results.