The Syniverse Platform supports two ways to refresh tokens. The first one is through the SDC portal and the second one is programmatically via APIs. I have described both the methods below.
- Token Refresh through SDC UI
Please follow the following steps on the SDC UI:
- Log into the SDC UI portal and go to the Applications page.
- Select the Application for which you want the token to be refreshed.
- Click on the gear icon at the upper right corner of the Application screen.
- Click on the “Auth Keys” tab of the Application screen.
- In order to re-generate the token, you need to provide the following parameters:
- The Token Expiration duration. Any value <=0 results in a non-expiring key.
- Select the unit associated with the value. Possible values are “Milliseconds”, “Minutes”, “Nanoseconds”, “Seconds”, “Microseconds”, “Hours” and “Days”.
- Click on the “Re-Generate” button.
- A new token is generated and displayed on the UI under “Access Token” field.
- Token Refresh – Programmatically
Please follow the following steps to refresh the token programmatically. The following API call can be used to refresh tokens:
/apptoken-refresh?consumerkey=xxxxxx&consumersecret=xxxxxx&oldtoken=xxxxxx&validity=xxxxxx
- The API call requires the following parameters:
- Consumer Key : Available via the UI in the Application page under “Auth Keys”
- Consumer Secret : Available via the UI in the Application page under “Auth Keys”
- Old Token : Available via the UI in the Application page under “Auth Keys”
- Validity: Should be a number with a unit of “Seconds”
- The sample API call example is as follows:
curl -X GET -H "Accept: application/json" "https://api.syniverse.com/apptoken-refresh?consumerkey=xxxxxx&consumersecret=xxxxxx&oldtoken=xxxxxx&validity=xxxxxx"
The response for the API call is:
{"accessToken":"<New Token>","validityTime":<Time to Expiration>}
Example - {"accessToken":"e6e9b18a-6e62-38fb-9bd4-9aa82e93f654","validityTime":86011}
Code Samples
There are also code samples in Java and Python on Github here
0 Comments