Skip to navigation

Get Storefront authToken with Credentials

Uses the login credentials of a storefront customer or a Company user to generate a storefront authToken to validate requests to the B2B Storefront GraphQL API. Unlike the Get a Storefront API authToken endpoint, this request does not rely on a JWT from an active storefront session.

By default, the resulting storefront authToken is valid for 1 day. However, you can adjust its validity period with the beginAt and endAt fields in the request body.

Authentication

X-Auth-Tokenstring
HeaderArgumentDescription
X-Auth-Tokenaccess_tokenFor more about API accounts that generate access_tokens, see our Guide to API Accounts.

For example requests and more information about authenticating BigCommerce APIs, see Authentication and Example Requests.

For more about BigCommerce OAuth scopes, see our Guide to API Accounts.

For a list of API status codes, see API Status Codes.

X-Store-Hashstring
HeaderArgumentDescription
X-Store-Hashstore_hashThe unique store hash associated with a BigCommerce store that has B2B Edition enabled.

Request

This endpoint expects an object.
storeHashstringRequired>=1 character
The unique store hash for the BigCommerce store.
emailstringRequiredformat: "email">=1 character
The email address associated with the user's account.
passwordstringRequiredformat: "password">=1 character
The password associated with the user's account.
channelIdintegerRequired
The storefront channel ID where the order was placed.
namestringRequired
The internal name assigned to the generated API token.
beginAtintegerOptional

The Unix timestamp indicating when the storefront authToken starts being valid.

endAtintegerOptional

The Unix timestamp indicating when the storefront authToken is no longer valid.

Response

OK
codeintegerOptionalDefaults to 200
The HTTP Status code of the response.
dataobjectOptional
metaobjectOptional