Consfusion with storeFrontAccessToken

3 1 1


I'm just starting out building a custom client storefront. However I'm a bit confused with which token to use and how to acquire the correct one.

I'm using the shopify-buy sdk for javascript.

The config specifies these fields:

const config = {
  storefrontAccessToken: Constants.storefrontAccessToken,
  domain: Constants.storefrontDomain,

const client = Client.buildClient(config);

When running a query like client.checkout.create(), I get these errors:

error [Error: The checkoutCreate mutation failed due to an unknown error.]

I think this is due to using the wrong type of token. I have created a custom app in the partner dashboard and copied the key from there. But I suspect this is wrong.

Can I get some pointers on what to do?

Shopify Staff
Shopify Staff
834 99 189

Hey @faroutchris,

If you're using a custom app, Oauth is used to get the storefrontAccessToken. You obtain the token after the merchant approves the Oauth scopes, then you can use the token to access the API, more details are available here.

If you're using the checkoutCreate mutation, make sure you've requested payment processing and asked for the correct Oauth scopes first.

JB | Developer Support @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit or the Shopify Web Design and Development Blog

3 1 1

This is an accepted solution.

With a bit of help from _JB I kind of figured it out. Posting here for myself in the future and others who might be confused by the docs.

I had created a custom app in the partner dashboard, this one doesn't give you a storeFrontAccessToken directly, it gives you oauth tokens used for the admin api which can then be further used to obtain the token when the merchant installs the app.

In the store dashboard ([store], there is an Apps section in the sidebar. Creating an app here gives you a storeFrontAccessToken.

Screenshot 2020-07-15 at 00.43.06.png

New Member
1 0 0


3 0 2

Honestly, you are god-sent.  I'm so thankful I can across your post before wasting hours looking for this info. THANK YOU!!!