Using Postman to test Enhanced Business SMS APIs
For easy testing using Postman, RingCentral provides a Postman 2.0 Collection for Enhanced Business SMS. If you use Postman, the we recommend using the collection as it provides authorization handling using Postman variables and environments as recommended by Postman.
The collection is available here:
This document describes how to install and use the Postman 2.1 Collection.
Pre-Requisites
This Postman spec is designed for following environment:
- Current RingCentral RingEX account located at: https://www.ringcentral.com.
- RingCentral app created at https://developers.ringcentral.com with JWT auth flow enabled.
Using Postman
Using Postman once you have your pre-requisites consists of a few steps:
- Importing the Postman Collection
- Creating/configuring Your Postman environment
- Authenticating and authorizing the user.
- Making an API call
Importing the Postman Collection
Use the following steps to import the Postman collection.
- In the upper left corner of the Postman application click the "Import" button.
- Click the "Import from Link" tab.
- Paste in the following URL where it says "Enter a URL and press import":
https://raw.githubusercontent.com/ringcentral/ringcentral-api-docs/master/docs/messaging/sms/specs/ringcentral_sms_rest_apis.postman_collection.json
- Click the "Continue" button
Configuring Your Postman Environment
The Postman Collection uses environment variables for authentication and authorization. Fill out the following for your environment:
- In Postman, create an environment by clicking the Gear icon for "Management Environments" in the upper right corner. This will bring up a list of existing environments.
- Click "Add" to create a new environment.
- Choose a name of your choice.
- Enter your enviroment variables as described below.
- Click the "Add" button to finish adding this environment. You can also use this Postman 2.1 Environment export as reference.
Variable | Description |
---|---|
RINGCENTRAL_SERVER_URL |
RingCentral's API URL which would be https://platform.ringcentral.com |
RINGCENTRAL_CLIENT_ID |
Application's Client ID |
RINGCENTRAL_CLIENT_SECRET |
Application's Client Secret |
RINGCENTRAL_JWT |
RingCentral user's JWT token from User's Profile -> Credentials |
Making an API call
To test the Postman collection, let's call the "Send SMS" API.
- In the Environments pick list in the upper right corner, select the environment you just created.
- In the left hand navigation menu, select "Auth" > "Auth via JWT Flow."
- Clicking on the "Send" button will run the "Pre-request Script" followed by API call, and then will load the
access_token
inmy_access_token
environment variable. You do not need to do anything with this token. - Navigate to "APIs" > "Send SMS" and click "Send".
If all your environment variables are set properly, you will be able to see the SMS sent out successfully. Follow this up by trying "Send MMS" API.
Feedback
If you have any feedback on using the Postman collection, please post to the RingEX docs repository.