Skip to main content

Config

The config API stores the initial configuration information for your app and lets you synchronously retrieve it.

The config API is available on the shopify global. It stores the initial configuration information for your app and shop.

string
required

The client ID provided for your application in the Partner Dashboard.

This needs to be provided by the app developer.

string[]

An allowlist of origins that your app can send authenticated fetch requests to.

This is useful if your app needs to make authenticated requests to a different domain that you control.

Configuration options for enabling debug features within the app. Includes options for monitoring performance metrics, such as web vitals.

Recommended for use during development and debugging to aid in identifying and resolving performance issues.

Generally not recommended for long-term use in production environments.

string[]

The features to disable in your app.

This allows app developers to opt-out of features such as fetch.

Anchor to experimentalFeatures
experimentalFeatures
string[]

The experimental features to enable in your app.

This allows app developers to opt-in to experiement features.

string

The base64-encoded host of the shop that's embedding your app.

This does not need to be provided by the app developer.

string
Default: 'en-US'

The locale of the shop that's embedding your app.

This does not need to be provided by the app developer.

string

The shop origin of the shop that's embedding your app.

This does not need to be provided by the app developer.

Was this section helpful?

Shop

shopify.config.shop;
// => 'your-shop-name.myshopify.com'

Retrieving config values

Retrieving the shop origin

Retrieving the host

Retrieving the locale

Retrieving the apiKey

Retrieving the disabledFeatures

Retrieving the appOrigins

Configuration for debugging apps.

Was this section helpful?

Shop

shopify.config.shop;
// => 'your-shop-name.myshopify.com'

Setting the apiKey

Setting the disabledFeatures

Setting the appOrigins

Enabling Debug Features for Performance Monitoring

Was this section helpful?

ApiKey

meta tag

<head>
<meta name="shopify-api-key" content="%SHOPIFY_API_KEY%" />

<script src="https://cdn.shopify.com/shopifycloud/app-bridge.js" />
</head>