VendorConnect Token Request

 

This section contains information on the web endpoint needed to obtain a bearer token that would be needed to send requests through other web service API methods, specifically the VendorConnect Order Update Request.

 

You will need to the following to process this request:

    Your unique Client ID and Client Secret provided by EWS Group.

 

RESTful Token Request

Request URI

https://www.moversconnect.net/api/IntegratorToken

Request Method

POST

Content-Type

application/json

Payload:

 

{

  "client_id": "5c0a833ab5a34e0396b570f...",

  "client_secret": "Yf<R-{%pTYw638ZRS{1z.YD+Fh}|(L1Eqf1w@ur7Csg...",

  "grant_type": "client_credentials"

}

Response:

 

{

  "access_token": "2qhorZE6un+0jWhuRVc....a_64_character string...",

  "token_type": "bearer",

  "expires_in": 179999

}

Notes:

 

“expires_in” token expiration in seconds (~50 hours)

 

There is only ever one active token per client id/client secret.  When you request a new token, all previously issued token(s) are automatically rendered invalid.  Thus, if you have multiple requests that each request a new token at the same time, then only the last request will be a valid token.  Thus, you should create one thread safe object that manages the token and whenever the stored token has expired (or is real close to expiring), it should request a new token and then return that token to all requests.  We can give you multiple tokens, but each would have a unique client id/client secret if that works better.  Our suggestion is to obtain a new token around midnight each day and then use that token until the next day when you can obtain another token.