This request creates a short-lived authentication or access token. Authentication to Route Optimization REST API requires an OAuth 2.0 Bearer Token in accord with RFC 6750. Most requests require the submission of the access token.
The access token expires after the interval of time that is specified in the expires_in
field of the response body. Route Optimization recommends that you use an access token until it expires, and then create a new one.
Example
This example shows a POST request that creates an access token:
POST https://developer.api.walmart.com/api-proxy/service/identity/oauth/v1/token
The parameters are sent in key-value pairs, in x-www-form-urlencoded
format.
The following is an example request body:
"grant_type": "client_credentials",
"client_id": "87ae5491-16cd-48b9-aa0f-345f72b9b8ff",
"client_secret": "rQZjqs50a_667OcX4UNMIkJRVBnwGjYd7A_ow8"
The client_id
and `client_secret` fields contain example values that are not for reuse.
The following is an example response body:
{
"token_type": "Bearer",
"expires_in": 900,
"access_token": "eyJraWQiOiI1NmM0M2M5My1...yJ8Ji-NRk8mVtXA"
}