For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Dev Portal
DocsAPI ReferenceLearnCommunityChangelog
DocsAPI ReferenceLearnCommunityChangelog
    • About Our APIs
  • REST
    • Overview
      • Overview
      • Storefront
      • Management
        • Overview
          • Addresses
          • Authentication
            • POSTGet Storefront authToken with Credentials
            • POSTGet B2B Storefront Token
            • GETGet Storefront API authToken
            • POSTGet Server to Server Token
            • DELDelete Backend API Tokens
            • GETList Server to Server Tokens
          • Channels
          • Company
          • Invoice Management
          • Orders
          • Payment
          • Quotes
          • Sales Staff
          • Shopping List
          • Super Admin
          • Users
  • GraphQL
    • Overview
  • MCP
    • Overview
Dev Portal
LogoLogo
RESTB2BManagementAuthentication

Get Storefront API authToken

GET
https://api-b2b.bigcommerce.com/api/io/auth/storefront
GET
/api/io/auth/storefront
$curl -G https://api-b2b.bigcommerce.com/api/io/auth/storefront \
> -H "X-Store-Hash: abc123" \
> -d jwtToken=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJlbWFpbCI6ImtpZG8yNzZAc25hcG1haWwuY2MiLCJzdG9yZV9oYXNoIjoiMWk2enB4cGUzZyIsImRiIjoiZGVmYXVsdCIsIm5hbWUiOiJ0ZXN0OSIsImNoYW5uZWxfaWRzIjpbMV0sInRva2VuX3R5cGUiOjMsIm5iZiI6MTAwMCwiZXhwIjoyMDAxfQ.EiR__LVAlBVNYtFCZPWJYoPv6UfGiXtULxhK-BCQZjY \
> -d channelId=1000234
1{
2 "code": 200,
3 "data": {
4 "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJlbWFpbCI6InRlc3RfYjJjX29yZGVyX2ltcG9ydEBxcS5jb21tIiwic3RvcmVfaGFzaCI6ImYyb3N4ampueGoiLCJkYiI6ImRlZmF1bHQifQ.L_u_enljWoYBbPPskmYEQVHldHIaTcWMIB-SdFah850"
5 },
6 "meta": {
7 "message": "SUCCESS"
8 }
9}
Returns an existing storefront authToken from an existing JSON Web Token (JWT). You can obtain a JWT using a request to the Current Customer API. See [Authentication for hosted storefronts](/developer/docs/b2b-edition/getting-started/authentication#rest-storefront-api) for instructions. The `channelId` field is optional for stores with multiple storefronts, since the JWT is tied to a specific storefront session. Including it does enforce strict adherence of token-related activity to channel-specific rules and behaviors. However, it is not necessary at all for single-storefront stores because there is only one storefront channel. The storefront authToken obtained from this endpoint is valid for **1 day**.
Was this page helpful?
Previous

Get B2B Storefront Token

Next

Get Server to Server Token

Built with

Returns an existing storefront authToken from an existing JSON Web Token (JWT). You can obtain a JWT using a request to the Current Customer API. See Authentication for hosted storefronts for instructions.

The channelId field is optional for stores with multiple storefronts, since the JWT is tied to a specific storefront session. Including it does enforce strict adherence of token-related activity to channel-specific rules and behaviors. However, it is not necessary at all for single-storefront stores because there is only one storefront channel.

The storefront authToken obtained from this endpoint is valid for 1 day.

Headers

X-Store-HashstringRequired
The unique store hash associated with a BigCommerce store that has B2B Edition enabled.

Query parameters

jwtTokenstringRequired

The JSON Web Token (JWT) obtained from a signed-in Company user. See Current Customer API to learn how to request a JWT.

channelIdstringOptional

The storefront channel ID associated with the storefront login session. Use 1 for your store’s default storefront channel. In a multi-storefront environment, this parameter enforces strict adherence of token-related activity to channel-specific rules and behaviors.

Note: Inclusion of this parameter in single-storefront environments will result in unpredictable behavior.

Response

OK
codeintegerDefaults to 200
The HTTP Status code of the response.
dataobject
metaobject

Errors

401
Unauthorized Error