Authentication & authorization

This article answers common questions about authentication and authorization.

How do I authenticate with Walmart Marketplace APIs?
Use OAuth 2.0 client-credentials to obtain a short-lived access token, then send it on every request. You can use the following sample request:
curl --request POST \ --url https://marketplace.walmartapis.com/v3/token \ --header 'Authorization: Basic eW91cl9pZDp5b3VyX3NlY3JldA==' \ --header 'Accept: application/json' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data 'grant_type=client_credentials'
For more details on authentication and how to start integrating Walmart Marketplace APIs, refer to Get an access token using Token API.
How do I generate or refresh an access token?
When the 15 minute access token nears expiry, you can refresh the access token using the refresh token. An access token expires after a certain interval, so you will have to refresh a user's access token. You could use refresh token, obtained from the token API call using authorization code grant type, to get a new access token. For detailed instructions, refer to Refresh access token
Why am I getting “invalid token” or “unauthorized” errors?
  • 401 (invalid/expired) - The access token is missing, malformed, expired, or was created for a different environment. Renew your access token; confirm you’re using the right environment keys.
  • 403 (forbidden) - The token is valid, but your app/account doesn’t have permission (scope/role) to call that endpoint or access that resource. Check app scopes/roles.
  • Mixed environments - A sandbox token is being used with a production URL (or the reverse). Tokens and base URLs must come from the same environment.
What is the difference between Delegated Access and OAuth 2.0?
Delegated Access allows sellers to create separate API credentials (Client ID and Secret) for each Solution Provider, with customizable permissions for services like inventory or order management. However, Walmart no longer allows new partners to use this method. OAuth 2.0 is a secure, token-based authorization protocol that enables third-party apps to access a seller’s Walmart data without sharing credentials. It’s the current standard and required for new integrations.
Can new Solution Providers use Delegated Access?
No. As of now, new Solution Providers must use OAuth 2.0 for integration. Delegated Access is only supported for providers with existing contracts. These providers may continue using it and can request support via Walmart’s support case system if needed.
What is OAuth 2.0 and why should I use it?
OAuth 2.0 is an industry-standard protocol that allows sellers to grant third-party applications limited, secure access to their protected resources on Walmart Seller Center. This method enhances data privacy, simplifies authentication, and streamlines integration by using token-based access instead of API keys.

A seller can log into Seller Center, go to the App Store, choose a solution provider app, and select Connect. You will be redirected to an authorization screen where you review and approve requested permissions. Once authorized, the app receives an authorization code, which it exchanges for an access token to interact with Walmart Marketplace APIs..

How can I get the OAuth 2.0 authorization code?
To retrieve an OAuth 2.0 code, go through the app connection flow:
  1. Log into Walmart Seller Center.
  2. Navigate to the App Store and choose an app.
  3. Select Connect. You'll be redirected to the app’s Auth page.
  4. Review permissions and select Authorize.

The app receives an authorization code at the redirect URL. This code is then exchanged for an access token using the Token API. Ensure all required parameters (like nonce) are properly handled.

What are the API keys used for?
API keys are used to authenticate and authorize your application to access Walmart's APIs and services.
How do I retrieve my API keys?
To retrieve your API keys, log in to your Walmart Developer account, go to the **My Account** page, and select **API Keys** under the _Account_ section.
What are the benefits of using Walmart's APIs?
Walmart's APIs provide a secure and scalable way to integrate your application with Walmart's eCommerce platform, allowing you to access a wide range of products and services.