Create an Access Token

This request creates a short-lived authentication or access token. Authentication to the Hub 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.
Marketplace Orders Hub recommends that you use an access token until it expires, and then create a new one.

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 code shows 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"
}
Form Data

Contains information that is used to authenticate the user.

The fields are sent in key-value pairs, in x-www-form-urlencoded format.

string
required

Specifies the literal "client_credentials". This value indicates the type of credentials that are used to authenticate the user.


Example: "client_credentials"

string
required

Specifies the client identifier.

Get this value from the system administrator or from developer management.


Example: "500c7c5c-47a2-11ee-be56-0242ac120002"

string
required

Specifies the client secret.

Get this value from the system administrator or developer management.

Keep the client secret secure. Treat it like a password.

Example: "ABCdefkTmKabcdfegGQ5RO9rQZjqs50a_667OcX4UNMIkJRVBnwGjYd7A_ow8ECmTDHR9_HijkLms1qpI0sb0g"

Headers
string
required


The literal "application/json". This value is the JSON content type.

string
required


The literal "application/x-www-form-urlencoded". This value identifies the content type of the request body.

Response

Language
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json