Generate an M2M access token
Send a client credentials request to Thomson Reuters authentication services to generate an access token for SafeSend API calls.
Obtain the client ID, client secret, and audience values from the SafeSend
Developer
section before you begin. - Send aPOSTrequest to the Thomson Reuters OAuth token endpoint.POST https://auth.thomsonreuters.com/oauth/token
- Include your client ID, client secret, audience, and theclient_credentialsgrant type in the request body.{ "client_id": "<YOUR_CLIENT_ID>", "client_secret": "<YOUR_CLIENT_SECRET>", "audience": "<TARGET_API_AUDIENCE>", "grant_type": "client_credentials" }
- Store the returned access token for use in subsequent SafeSend API requests.
The authentication service returns an access token, the granted scope, the token lifetime in seconds, and the token type.
{ "access_token": "<ACCESS_TOKEN>", "scope": "https://api.tr.com/auth/safesend.all", "expires_in": <TIME_IN_SECONDS>, "token_type": "Bearer" }
Generate a new access token when the current token expires.