Authentication

Token-based Authentication

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

Integration Steps

  1. Log into the Walmart Developer Portal.

  2. 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.

  3. Your software uses the keys to generate a short-lived token, (which expires after 15 minute), using the Token API.

  4. 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.

NameDescriptionRequiredExample
AuthorizationBasic authorization header. Base 64 encodes the Client ID and Client Secret retrieved in step two of the integration steps.YesBasic YzcyOTFjNmItNzI5MC00….
WM_SEC.ACCESS_TOKENThe token retrieved in step three of integrationYeseyJraWQiOiIzZjVhYTFmNS1hYWE5LTQzM…..
WM_CONSUMER.CHANNEL.TYPEA unique ID to track the consumer request by channelYes for V3, optional for V20f3e4dd4-0514-4346-b39d-… use the Consumer Channel Type received during onboarding
WM_SVC.NAMEWalmart Service NameYesWalmart Marketplace
WM_MARKETMarket header name where business is being done.Yesmx

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