Skip to content
Published Authored byBilly Reiner

Glossary · Defined term

Shopify API key

People say "Shopify API key" about three different credentials. Shopify's docs settle the naming: tools that read SHOPIFY_API_KEY want the app's client ID, and SHOPIFY_API_SECRET means the client secret1. What actually authorizes an Admin API request is a third thing, the access token2.

The confusion got worse on 1 January 2026, when Shopify stopped letting anyone create custom apps in the admin3. The old API credentials screen still exists, but only for apps made before that date. New apps come from the Dev Dashboard, and the tokens they get last 24 hours4.

Definition

A Shopify API key is an app's public identifier, which Shopify now calls the client ID. It is paired with a client secret, the old API secret key. Neither one calls the Admin API by itself: every request carries an access token in the X-Shopify-Access-Token header.

Shopify's credential docs state the rule that goes with the names: "Your client ID is safe to include in frontend code. Your client secret must never be exposed to the browser or included in client-side code"1. An API key on its own tells Shopify which app is asking. It gives no access to any store's data.

The credentials side by side

Three credentials sit behind a custom app. The client ID identifies the app, the client secret proves the app is yours, and the access token is what your code sends with each Admin API call.

CredentialAlso calledWhat it doesWhere it may live
Client IDAPI key, SHOPIFY_API_KEYIdentifies the appAnywhere, including frontend code
Client secretAPI secret key, SHOPIFY_API_SECRETExchanged for access tokens. Webhook signatures change when you rotate itServer only
Admin API access tokenAccess tokenAuthorizes Admin API requests, limited to the app's scopesServer only

The token goes in the X-Shopify-Access-Token header2. The Storefront API, which headless builds such as Hydrogen storefronts read from, uses separate tokens and separate headers: X-Shopify-Storefront-Access-Token for public tokens and Shopify-Storefront-Private-Token for private ones.

For SEO work, the usual reason to want a token is a bulk edit the admin doesn't offer, such as setting the seo.hidden metafield across hundreds of products. Redirects are the exception: the admin's CSV import handles most bulk redirect jobs with no API access at all.

Getting an access token in 2026

For a new custom app on your own store: create the app in the Dev Dashboard, choose its scopes, install it, then exchange the client ID and secret for a token. The token expires after 24 hours, so your code requests a fresh one when it needs it.

  1. Open the Dev Dashboard at dev.shopify.com/dashboard. Go to Apps, click Create app, choose Start from Dev Dashboard, name the app and click Create5.
  2. On the Versions tab, set the app URL, pick a Webhooks API version and select the access scopes the app needs. Click Release5.
  3. On the app's Home page, scroll to Install app, pick the store and click Install5.
  4. Under Settings, copy the Client ID and Client secret from the Credentials section1. Store them as environment variables, never in a file you might commit4.
  5. Post them to the store's token endpoint and send the token you get back with every Admin API request6.
bash Step 5: exchange the client credentials for a 24-hour token
curl -X POST "https://{shop}.myshopify.com/admin/oauth/access_token" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "grant_type=client_credentials" \
  -d "client_id=$SHOPIFY_CLIENT_ID" \
  -d "client_secret=$SHOPIFY_CLIENT_SECRET"

# Response
# {"access_token": "your-token", "scope": "read_products", "expires_in": 86399}
bash Then call the GraphQL Admin API with the token
curl -X POST "https://{shop}.myshopify.com/admin/api/2026-07/graphql.json" \
  -H "Content-Type: application/json" \
  -H "X-Shopify-Access-Token: $SHOPIFY_ACCESS_TOKEN" \
  -d '{"query": "{ shop { name } }"}'

This client credentials grant only works when the app and the store belong to the same Shopify organization4. For someone else's store you need the authorization code grant or custom distribution with token exchange, and Shopify recommends Shopify CLI for apps built for other merchants6.

Not everyone on a store can do this. Store owners can create custom apps by default. Staff need the App development > Develop permission, and collaborator accounts can't open the Dev Dashboard at all7. If an agency is doing the work on a collaborator account, the store owner has to create the app or grant a staff account.

Legacy admin-created custom apps

Custom apps made in the Shopify admin before 1 January 2026 keep working. You can't create new ones, and the ones you have come with rules that hurt if you forget them.

Their credentials are under Apps > Develop apps > [your app] > API credentials8. The Admin API access token was shown once, when it was generated. If nobody saved it, the only way to get another is to uninstall and reinstall the app, which breaks API requests and webhooks until your code has the new token. You can't rotate the API key or secret on these apps either.

Security rules for Shopify API credentials

Treat the client secret and every access token like the password to your store's admin data. The client ID is the only credential in this set you can show in public.

  • Keep secrets in environment variables or a secrets manager and never commit them to version control1.
  • Never put the secret or a token in a theme file or a script tag. Anything Liquid outputs ends up in the visitor's browser.
  • Ask for the fewest scopes the job needs. A token reads exactly what its scopes allow2, so a leaked read_products token exposes your catalog, while a leaked token with order and customer scopes exposes your customers.
  • Rotate the client secret on a schedule, and straight away if you think it leaked. Tokens minted under the old secret stop working once you revoke it1.
  • Custom apps that need Level 2 personal data ("Custom Level 2 PII apps" in Shopify's terms) require the Grow plan or higher. Moving to Basic removes that access7.

Dates behind the old advice

Four dates explain most of the out-of-date API key advice still ranking in search results and forum threads.

DateChange
1 October 2024The REST Admin API becomes a legacy API9
1 April 2025New public apps must be built only with the GraphQL Admin API9
30 October 2025Shopify announces the end of admin-created custom apps3
1 January 2026Creating custom apps in the admin stops. Existing ones keep working3

A tutorial that sends you to Develop apps to create a new app, or that builds on REST endpoints, predates at least one of these changes. On 16 September 2026 the newest GraphQL Admin API version listed on shopify.dev was 2026-0710.

API credentials are the app side of Shopify. The theme side runs on Liquid and needs none of them.

  • Liquid: theme code that runs on Shopify's servers without any API key.
  • Web Bot Auth: HTTP message signatures that authenticate your own crawlers, a separate credential from anything on this page.
  • Currency format: prices you read through the API come back as amounts, and the store's format decides how the storefront prints them.
  • Hydrogen SEO: the headless setup that runs on Storefront API tokens.