The Walmart Marketplace APIs use OAuth for token-based authentication and authorization. This is the new standard method which should be used moving forward. The benefits of using of token-based authentication include:
- Current standards for API Authentication
- Reduced overhead of creating and signing the digital signature
- Easier integration with Walmart APIs
- Reduced number of headers per API call
- Log into the Walmart Developer Portal.
- Retrieve Client ID/Client Secret. The Client ID/Client Secret is not the same as Consumer ID/Private Key used in the old authentication method.
- Your software uses the keys to generate a short-lived token, (which expires after 15 minute), using the Token API.
- Use the headers listed in the table below to authenticate your API call. These headers are mandatory for all API calls for authentication. Individual APIs may require additional headers.Note:
- You must contact your Solution Providers to provide the Client ID/Client Secret.
Common Header Parameters
The common headers are required and shared among all of the APIs. These headers are included to implement standards across APIs and provide the function of tracking and debugging issues.
|Authorization||Basic authorization header. Base 64 encodes the Client ID and Client Secret retrieved in step two of the integration steps.||Yes||Basic YzcyOTFjNmItNzI5MC00….|
|WM_SEC.ACCESS_TOKEN||The token retrieved in step three of integration||Yes||eyJraWQiOiIzZjVhYTFmNS1hYWE5LTQzM…..|
|WM_CONSUMER.CHANNEL.TYPE||A unique ID to track the consumer request by channel||Yes for V3, optional for V2||0f3e4dd4-0514-4346-b39d-… use the Consumer Channel Type received during onboarding|
|WM_SVC.NAME||Walmart Service Name||Yes||Walmart Marketplace|
|WM_MARKET||Market header name where business is being done.||Yes||mx|
Note: If WM_MARKET header is missing, the market defaults to “us”.
Sample: Common Header
Authorization: Basic Base64Encode(clientId:clientSecret) WM_SEC.ACCESS_TOKEN: eyJraWQiOiIzZjVhYTFmNS1hYWE5LTQzM..... WM_CONSUMER.CHANNEL.TYPE: 0f3e4dd4-0514-4346-b39d-... WM_SVC.NAME: Walmart Marketplace WM_MARKET: mx