There are use cases where an enterprise needs to integrate a third-party application with SCG (Syniverse Communication Gateway), and the available or preferred authentication protocol is OAuth 2.0, which is currently supported by SCG.
This document provides step-by-step guidelines to set up SCG OAuth 2.0 in Postman for API call testing. It offers a specific example of how to configure the SCG OAuth parameters in Postman to effectively use this authentication protocol.
Postman OAuth2.0 fields
The fields needed to set up OAuth 2.0 depend on the grant type. SCG supports the Client Credentials grant type, and as a result, the required Postman fields are described below.
- Token Name: Any descriptive name you choose (e.g., SynToken)
- Header prefix: Bearer
- Grant type: Client Credentials
- Callback URL: Not required for client credentials
- Auth URL: Not required for client credentials (leave blank)
- Access Token URL: https://api.syniverse.com/token
- Client ID: Your client ID is your Syniverse SDC, Application, Auth Keys, Consumer Key.
- Client Secret: Your client secret is your Syniverse SDC, Application, Auth Keys, Consumer Secret.
- Scope: am_application_scope
- State: Leave blank (not required for client credentials)
- Client Authentication: Send as Basic Auth header
Details on how to find your SCG Credentials here.
SCG Setting in Postman OAuth2.0 Authorization
Let's say that you want to set OAuth2.0 authorization on a Postman request that calls /messages SCG API.
For this example, let’s use the credentials:
- Consumer key gvX_uJsnVVT58um9u9biU7yXXXXXX
- Consumer secret RyDunpYB71HXH3XyzWsfbXXXXXXX
Select the Authorization tab to display the Postman screen depicted in the screenshots below, that shows you how to set all the fields: start by selecting Auth Type OAuth2.0
Fill the fields accordingly
SCG OAuth requires the "validity_period" key to prevent a Postman server error.
Set this key in the Body request of the sections:
- Token Request
- Refresh Request
In the example, we set the key the value of 300 seconds as seen in the image below.
After setting the parameter fields, you need to click the "Get New Access Token" orange button to get the Bearer token the Postman will use when the API call is executed:
As result you should get the message:
You click proceed and then click Use token:
Finally, you get this view that shows the selected token "SynToken" and the redacted token value:
Now you can test the SCG API call successfully.
0 Comments