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.
This Postman spec is designed for following environment:
- Current RingCentral MVP account located at: https://www.ringcentral.com.
- RingCentral app created at https://developers.ringcentral.com with Password-based or JWT auth flow enabled.
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":
- 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.
||RingCentral's API Url which would be https://platform.ringcentral.com for Production and https://platform.devtest.ringcentral.com for Sandbox|
||Application's Client ID|
||Application's Client Secret|
||RingCentral user's extension number|
||RingCentral user's password. Note, this needs to be using the RingCentral passsword system and not SSO for this Postman spec.|
||RingCentral user's JWT token from User's Profile -> Credentials|
If you are using authentication based on password flow, you would need to fill in RINGCENTRAL_USERNAME, RINGCENTRAL_EXTENSION(optional) and RINGCENTRAL_PASSWORD only. No need to fill in RC_JWT.
If you are using authentication based on JWT flow, you would need to fill in RINGCENTRAL_JWT only.
See the Developer Guide for information on several authentication methods that your app can use.
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 Password Flow" if using password based authentication. Select "Auth" > "Auth via JWT Flow" if using JWT.
- Clicking on the "Send" button will run the "Pre-request Script" followed by API call, and then will load the access_token in "my_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.
If you have any feedback on using the Postman collection, please post to the RingCentral MVP docs GitHub repo.