‹   Back

How do I test my REST API integration?

Follow these easy steps to test your REST API integration in our sandbox environment. You’ll be able to send free test messages to your pre-registered test phone numbers.

1. You’ll need a REST API client to make REST calls. In this example, we make use of Postman, but you can use any REST API client. Install Postman as an app in your Google Chrome browser.

2. Log in to Clickatell SMS Platform and create your Sandbox REST API integration. Here is a quick tutorial video on how to set up your integration.

3. On the SMS integrations page, click on your newly created integration and select Code library from the tabs along the top of the page. Your code snippet will already be populated with all the information you need to test including your API key (which is referred to as the authorization code in your snippet).

4. Open Postman and add a new tab (call).

Test REST API integration

5. Set the call to POST.

6. Copy and paste the API end URL into the request URL field.

7. Set your authorization type to “No Auth”.

How do I test my REST API integration

8. Open the Headers section.

9. Add ‘Content-Type’ as a new key with the value ‘application/json’.

10. Next, add ‘Accept’ as a new key with value ‘application/json’.

11.  Now add ‘Authorization’ as a key and copy and paste your unique API key into the value field. Your API key can be found either on the SMS integrations page, on the details page for your integration, or in your code snippet (where it is referred to as your authorization code within the snippet).

How do I test my REST API integration

12. Next, move to the Body section.

13. Set your format to raw.

14. Now copy the call content from your code snippet (all text within the single quotes on the line starting with -d) and paste it into the editor box. Do not include the single quotes.

15. You’re ready to go! You can save your call and hit the send button at the top to send your test message.

16. Postman will display the return response received from the API call and you should receive the message on your test phone.

How do I test my REST API integration

If your test number is not linked to your sandbox integration, you won’t receive the message on your test phone but the response you receive in Postman will be a simulated response. It therefore emulates what the response will look like in your system. See more about how to link your test number to your integration here. The response will include an API message ID which you can use to track in the Sent detail report.

Other resources

Ask the community

Visit Stack Overflow to join our community of developers and find the answer you need.
Visit Stack Overflow

Contact support

Contact our support team and one of our agents will be in touch with you to answer any questions you have.
Contact us

SMS Platform

Clickatell SMS Platform is a bulk SMS system that enables you to send messages securely, reliably and instantly, sparking a dynamic dialogue between business and customer.

Find out more