Get Storefront API authToken

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**.

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