---
updatedAt: 2026-06-25T15:51:43.000Z
---

# Token API

Obtain access tokens for API authentication using OAuth 2.0 by providing Client ID and Client Secret. This endpoint supports multiple grant types for different authentication scenarios - Client Credentials Grant, Authorization Code Grant, Refresh Token Grant.

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. <b>Token Lifetimes</b><br /><ul><li><b>Access Token:</b> 15 minutes (900 seconds)</li><li><b>Refresh Token:</b> 1 year (365 days)</li></ul><br /> <a href="https://developer.walmart.com/us-marketplace/docs/get-an-access-token">Get an access token using Token API</a>

<a href="https://developer.walmart.com/us-marketplace/docs/get-started-as-a-seller">Get started as a seller</a>

<a href="https://developer.walmart.com/us-marketplace/docs/get-started-as-a-solution-provider">Get started as a solution provider</a>

<a href="https://developer.walmart.com/us-marketplace/docs/oauth-20-authorization">OAuth2.0 authorization</a>

[block:html]
{
  "html": "<a\n  href=\"https://god.gw.postman.com/run-collection/34477757-4e4731cf-b730-409e-899e-a35aeb947ccb?action=collection%2Ffork&source=rip_markdown&collection-url=entityId%3D34477757-4e4731cf-b730-409e-899e-a35aeb947ccb%26entityType%3Dcollection%26workspaceId%3De352a845-5a81-4cbe-9122-9b33bac31bf3\"\n  target=\"_blank\"\n  style=\"text-decoration: none\"\n>\n  <button>\n    <img\n      src=\"https://run.pstmn.io/button.svg\"\n      alt=\"Run In Postman\"\n      style=\"width: 128px; height: 32px\"\n    />\n  </button>\n</a>"
}
[/block]

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "Authentication & Authorization Management",
    "version": "1.0",
    "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/us/mp/us-mp-auth2/#606) for comprehensive instructions. Existing seller connections using the previous authorization method will remain operational."
  },
  "x-readme": {
    "proxy-enabled": true,
    "samples-languages": [
      "shell"
    ],
    "explorer-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": "Obtain access tokens for API authentication using OAuth 2.0 by providing Client ID and Client Secret. This endpoint supports multiple grant types for different authentication scenarios - Client Credentials Grant, Authorization Code Grant, Refresh Token Grant.\n\nAn 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. <b>Token Lifetimes</b><br /><ul><li><b>Access Token:</b> 15 minutes (900 seconds)</li><li><b>Refresh Token:</b> 1 year (365 days)</li></ul><br /> <a href=\"https://developer.walmart.com/us-marketplace/docs/get-an-access-token\">Get an access token using Token API</a>\n\n<a href=\"https://developer.walmart.com/us-marketplace/docs/get-started-as-a-seller\">Get started as a seller</a>\n\n<a href=\"https://developer.walmart.com/us-marketplace/docs/get-started-as-a-solution-provider\">Get started as a solution provider</a>\n\n<a href=\"https://developer.walmart.com/us-marketplace/docs/oauth-20-authorization\">OAuth2.0 authorization</a>",
        "operationId": "tokenAPI",
        "parameters": [
          {
            "in": "header",
            "name": "WM_PARTNER.ID",
            "description": "Partner ID registered in Walmart marketplace to identify a seller account. <br /> This field is required when `grant_type` is `authorization_code` or `refresh_token`.",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "43423324"
          },
          {
            "in": "header",
            "name": "Authorization",
            "description": "Use a Basic Authorization header by Base64-encoding the Client ID and Client Secret obtained in step two of the integration process. Format the credentials as ClientID:ClientSecret before encoding.",
            "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 that identifies each API call and is used to track and debug issues. Use a randomly generated GUID for this ID.",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "b3261d2d-028a-4ef7-8602-633c23200af6"
          },
          {
            "in": "header",
            "name": "WM_SVC.NAME",
            "description": "Specifies the name of the Walmart service being called.",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "Walmart Marketplace"
          }
        ],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "required": [
                  "grant_type"
                ],
                "type": "object",
                "properties": {
                  "grant_type": {
                    "type": "string",
                    "description": "Type of OAuth2.0 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 returned to your redirect URI, 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": "Redirect URI must exactly match one of the URIs registered for your client app, which was 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. Use it to exchange for a new access token when the current one expires. <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": "OAuth 2.0 access token to authorize Walmart Marketplace API calls.",
                      "default": "eyJraWQiOiI1MWY3MjM0Ny0wYWY5LTRhZ...."
                    },
                    "token_type": {
                      "type": "string",
                      "description": "OAuth2.0 token type as specified by the user.",
                      "default": "Bearer"
                    },
                    "expires_in": {
                      "type": "integer",
                      "description": "Expiry time of an access token in seconds.",
                      "format": "int32",
                      "default": 900
                    },
                    "refresh_token": {
                      "type": "string",
                      "description": "Refresh token which should be used to refresh access token, to obtain a new access token without user interaction.<br /> This field is present in response when **grant_type: authorization_code**.",
                      "default": "APXcIoTpKMH9OQN……."
                    }
                  }
                },
                "example": {
                  "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
                    }
                  },
                  "access_token": "eyJraWQiOiIzN2JmOWQ5MS04ZDRkLTQwYjEtODU4NS1mNzhlZDc3MjM4MDQiLCJlbmMiOiJBMjU2R0NNIiwiYWxnIjoiZGlyIn0..bKkYKqJ5CP0Qb2Qz.wQ4TTa2nwL1rbT98BBdbTi_MRNMM0gW_5q8im6uX4olRwYiuOXjaG6TbnnFOK5fT0UzMEJUf-uybalogMH78cHP0ZyL6hONKJOMJ8VK3ThcZ4AUcqrMRBNIMFiAWSTvHJg1y5g-t-WwmZbaD589dMll7-aXG6PPncpeQA1zOyOTaELjDA4O4jimc2_7PnEdc6ETv89AKcnw1J1cPz6BPG9jpyLVX_zEZcQnxbAHYZiSFscFCzdMtpFDrPWIwWuRcV5qRlH4DghHMqKG7V2wqX1VYV_gUvLH5b2y8O6Y0u9nmkBpqTGNiMpWzNE7amFyqKExGk4Jc_ziJdsrj38cSz9a4KtZOrV6E3mN5gFFEQSNAGzrdEv2IdTfWdNgTnHopQecgrlP7EcsrmGh1ARGTWr-e7RaiL8m2Sx5i9odGj5FDJKXiDeohX-KEB-Vc2KJeLxvYAHA7nPT1_pkZDBCfpqq_6GAUBDEbDZ6mJH93TAE1YhFeR_jcdl_23lND9sHKlvHA97-fHAjEVTqu-4wVmFFelGyJD4VIBkieWn94jq_opMiz-RjyYn8Vj-tfdJy8azBNt5NkjjW7Rsque04LsfujrqHDcJHio3ukT5JKwxNv9PoHMxoHnQ5fUdF4pOzt6ZShkki-jSbhileDlClh0ufLSNYgBmy6Fz4wTZWgL-DhJOcv-7Cup95Rx35Wh7XDYTbdz_z_avtfF-f-JS5XyN20Hn-gioWdNA7DNhI1O6s7zKZ2s2iD9eFkprOLGtcJzvNVjrxKZKD6R0hrUUzDXRn95oWlJXfan-OsTNdRypfGWFqIes-n8cBhzVF69LEWIDMr6YfdkRkmCq_p_A.Bvyf-k_rnsiiuf0jGGVXvw",
                  "token_type": "Bearer",
                  "expires_in": 900
                }
              },
              "application/xml": {
                "schema": {
                  "required": [
                    "accessToken"
                  ],
                  "type": "object",
                  "properties": {
                    "accessToken": {
                      "type": "string",
                      "description": "OAuth 2.0 access token to authorize Walmart Marketplace API calls.",
                      "xml": {
                        "namespace": "http://walmart.com/"
                      }
                    },
                    "tokenType": {
                      "type": "string",
                      "description": "OAuth2.0 token type as specified by the user.",
                      "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": "Refresh token which should be used to refresh access token, to obtain a new access token without user interaction.<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"
              }
            }
          }
        }
      }
    }
  }
}
```