---
updatedAt: 2026-08-03T17:45:00.000Z
---

# Token API

<div class="amber-callout" aria-label="Migration notice"><p><strong>Migrate to Global APIs:</strong> New sellers and approved Solution Providers should use Global APIs. Existing users must migrate to avoid disruption and access new capabilities coming to your market. Explore <a href ="https://developer.walmart.com/global-marketplace/docs/global-marketplace-apis" style="text-decoration: underline !important; font-weight: 700;">Global Marketplace migration resources</a>.</p></div><br>Get access token by providing Client ID and Client Secret.<br />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. Refresh tokens remain valid for a year.<br /><br /> [Guide reference - <a href="/cl-marketplace/docs/authentication">client_credentials</a>]

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "version": "1.0",
    "title": "Authentication & Authorization Management",
    "description": "The Walmart Marketplace APIs use OAuth for token-based authentication and authorization.<Br /> We also introduced OAuth 2.0 for solution providers to enable new authorizations using authorization code grant type. Sellers can now connect with solution provider apps seamlessly through this new Walmart's OAuth 2.0 user experience. Refer to the [Guide section](/doc/cl/cl-mp/cl-mp-auth/) for comprehensive instructions. Existing seller connections using the previous authorization method will remain operational."
  },
  "x-readme": {
    "samples-languages": [
      "shell"
    ],
    "proxy-enabled": true
  },
  "servers": [
    {
      "url": "https://marketplace.walmartapis.com",
      "description": "Production URL"
    },
    {
      "url": "https://sandbox.walmartapis.com",
      "description": "Sandbox URL"
    }
  ],
  "paths": {
    "/v3/token": {
      "post": {
        "tags": [
          "Authorization"
        ],
        "summary": "Token API",
        "description": "<div class=\"amber-callout\" aria-label=\"Migration notice\"><p><strong>Migrate to Global APIs:</strong> New sellers and approved Solution Providers should use Global APIs. Existing users must migrate to avoid disruption and access new capabilities coming to your market. Explore <a href =\"https://developer.walmart.com/global-marketplace/docs/global-marketplace-apis\" style=\"text-decoration: underline !important; font-weight: 700;\">Global Marketplace migration resources</a>.</p></div><br>Get access token by providing Client ID and Client Secret.<br />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. Refresh tokens remain valid for a year.<br /><br /> [Guide reference - <a href=\"/cl-marketplace/docs/authentication\">client_credentials</a>]",
        "operationId": "tokenAPI",
        "parameters": [
          {
            "in": "header",
            "name": "WM_PARTNER.ID",
            "description": "Partner Id registered in Walmart marketplace to identify a seller. <br /> This field is required when **grant_type: authorization_code** and **grant_type: refresh_token**",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "43423324"
          },
          {
            "in": "header",
            "name": "WM_MARKET",
            "description": "Available marketplace location: us (USA), mx (Mexico), ca (Canada) or cl (Chile)",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "us, mx, ca or cl"
          },
          {
            "in": "header",
            "name": "Authorization",
            "description": "Basic authorization header. Base 64 encodes the Client ID and Client Secret retrieved in step two of the integration steps.",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "Basic YzcyOTFjNmItNzI5MC00...."
          },
          {
            "in": "header",
            "name": "Content-Type",
            "description": "Content type of the request body.",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/x-www-form-urlencoded"
          },
          {
            "in": "header",
            "name": "WM_CONSUMER.CHANNEL.TYPE",
            "description": "A unique ID to track the consumer request by channel. Use the Consumer Channel Type received during onboarding.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "WM_QOS.CORRELATION_ID",
            "description": "A unique ID which identifies each API call and used to track and debug issues; use a random generated GUID for this ID",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "b3261d2d-028a-4ef7-8602-633c23200af6"
          },
          {
            "in": "header",
            "name": "WM_SVC.NAME",
            "description": "Walmart Service Name",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "Walmart Service Name"
          }
        ],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "required": [
                  "grant_type"
                ],
                "type": "object",
                "properties": {
                  "grant_type": {
                    "type": "string",
                    "description": "Type of grant requested. <br /> **Available grant types:** authorization_code, refresh_token and client_credentials",
                    "enum": [
                      "authorization_code",
                      "refresh_token",
                      "client_credentials"
                    ],
                    "default": "client_credentials"
                  },
                  "code": {
                    "type": "string",
                    "description": "Authorization code obtained by your client app when the seller authorizes your app to access the seller resource. <br /> This field is required when **grant_type: authorization_code**",
                    "default": "65CA5DA313A549D49D15D3119D9AD85D"
                  },
                  "redirect_uri": {
                    "type": "string",
                    "description": "This should be same as one of your client app URIs provided while registering the app. <br /> This field is required when **grant_type: authorization_code**",
                    "default": "https://example-client-app.com"
                  },
                  "refresh_token": {
                    "type": "string",
                    "description": "Refresh token received as response of Authentication API with authorization_code grant type, to be used to refresh the access token. <br /> This field is required when **grant_type: refresh_token**",
                    "default": "APXcIoTpKMH9OQN....."
                  }
                }
              },
              "examples": {
                "clientCredentialsReq": {
                  "summary": "Token API - client_credentials",
                  "value": {
                    "grant_type": "client_credentials"
                  }
                },
                "tokenAPIReq": {
                  "summary": "Token API - authorization_code",
                  "value": {
                    "grant_type": "authorization_code",
                    "code": "65CA5DA313A549D49D15D3119D9AD85D",
                    "redirect_uri": "https://example-client-app.com"
                  }
                },
                "refreshTokenReq": {
                  "summary": "Token API - refresh_token",
                  "value": {
                    "grant_type": "refresh_token",
                    "refresh_token": "APXcIoTpKMH9OQN……."
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Operation",
            "content": {
              "application/json": {
                "schema": {
                  "required": [
                    "access_token",
                    "expires_in",
                    "token_type"
                  ],
                  "type": "object",
                  "properties": {
                    "access_token": {
                      "type": "string",
                      "description": "Access token to be used for accessing business APIs",
                      "default": "eyJraWQiOiI1MWY3MjM0Ny0wYWY5LTRhZ...."
                    },
                    "token_type": {
                      "type": "string",
                      "description": "Type of token according to user. (e.g., 'BEARER')",
                      "default": "Bearer"
                    },
                    "expires_in": {
                      "type": "integer",
                      "description": "Expiry time of access token in seconds",
                      "format": "int32",
                      "default": 900
                    },
                    "refresh_token": {
                      "type": "string",
                      "description": "Token which should be used to refresh access token.<br /> This field is present in response when **grant_type: authorization_code**",
                      "default": "APXcIoTpKMH9OQN……."
                    }
                  }
                },
                "examples": {
                  "clientCredentialsRes": {
                    "summary": "Token API - client_credentials",
                    "value": {
                      "access_token": "eyJraWQiOiI1MWY3MjM0Ny0wYWY5LTRhZ.....",
                      "token_type": "Bearer",
                      "expires_in": 900
                    }
                  },
                  "tokenAPIRes": {
                    "summary": "Token API - authorization_code",
                    "value": {
                      "access_token": "eyJraWQiOiI1MWY3MjM0Ny0wYWY5LTRhZ.....",
                      "refresh_token": "APXcIoTpKMH9OQN....",
                      "token_type": "Bearer",
                      "expires_in": 900
                    }
                  },
                  "refreshTokenRes": {
                    "summary": "Token API - refresh_token",
                    "value": {
                      "access_token": "eyJraWQiOiI1MWY3MjM0Ny0wYWY5LTRhZ.....",
                      "token_type": "Bearer",
                      "expires_in": 900
                    }
                  }
                }
              },
              "application/xml": {
                "schema": {
                  "required": [
                    "accessToken"
                  ],
                  "type": "object",
                  "properties": {
                    "accessToken": {
                      "type": "string",
                      "description": "Access token to be used for accessing business APIs",
                      "xml": {
                        "namespace": "http://walmart.com/"
                      }
                    },
                    "tokenType": {
                      "type": "string",
                      "description": "Type of token according to user. (e.g., 'BEARER')",
                      "xml": {
                        "namespace": "http://walmart.com/"
                      }
                    },
                    "expiresIn": {
                      "type": "integer",
                      "description": "Expiry time of access token in seconds",
                      "format": "int32",
                      "xml": {
                        "namespace": "http://walmart.com/"
                      }
                    },
                    "refresh_token": {
                      "type": "string",
                      "description": "Token which should be used to refresh access token.<br /> This field is present in response when **grant_type: authorization_code**",
                      "xml": {
                        "namespace": "http://walmart.com/"
                      }
                    }
                  },
                  "xml": {
                    "name": "oAuthToken"
                  }
                },
                "example": "<OAuthTokenDTO xmlns=\"\">\n    <accessToken>eyJraWQiOiIzN2JmOWQ5MS04ZDRkLTQwYjEtODU4NS1mNzhlZDc3MjM4MDQiLCJlbmMiOiJBMjU2R0NNIiwiYWxnIjoiZGlyIn0..yI0d0EFgt3gpEMQj.APvV5upgh1nBRcZPG6d9a5PYNAwayZdIZc4s-J42Ol-Zk6V9liVWmgs4qyPdkghfLKWwAyOBoc5g1vxRsYQNOeDH_p7KM_dO3D80g8adtGDkcAoEimyhP0inGHOjT2PziwIWjtRbE5bm8WTZN7wwJPV5SFqBP-XvS03OdPcZ2V_f0mVln5EdzaRt0BmpvlVDgqn_9Pe_jIYadWX-qc1N_Lh6oe3Q6bUKTJIhb6N-v8dNDO6qyRbeWo0_0M1s7g_mBKIp2FeO8a_ezIkpjtRv81SwXxEDqFacT2O46GlILO0Nfh7lbI2HZK2eUPrC-XVCiLiGoKsQDxHxD_Po0QrH0OxD6jnQvUfiqpgsULsvtbsSuHpUNl-OlIFhxODRxyIILsjAoWaQi9yEEV5swLVTdCix7e8ZKJPWQKEi55e7WYZm8vJqIUaaKrgdbw8HDlOWiJcrzzKdg-Hk3QBxnuoT4wqiaJaKb3uIQUtPzo5Jn_58PIxHh1WawpJOOmTH5RFgGTHlMB-5nBKG0iW1Bzm_vlg0NU_ZlYjvTWWDGOldk18WbzBr88XUI_jyRylFp_gYxc2peAyPnhZtOJGC4-7Eudbjz7QtClntVenjcG9h0k-xUejD0fcvCQUCty8S0ZfvCMEhrOJXEYCfI9-ESFFzpRh0EDCyfllS2Ugor4ZtUBjztXsj5sz2tp1wOSG7QR22K8rBKBFSyaKdIrNoLoucCEFFqlK_WSxfgsvUhspr4ZztxzPCejv3pKu9XYOV5nM6_qRsQY9ub88kQQKf2ZwNUnuYM_JYcvr2P9R551Pqqssk2KmbU42P35a2t5xJo9h921tGxUNjS9k4LAaO9g.Em_yWzxnUwwvs90IRZzH-Q</accessToken>\n    <tokenType>Bearer</tokenType>\n    <expiresIn>900</expiresIn>\n</OAuthTokenDTO>\n"
              }
            }
          }
        }
      }
    }
  }
}
```