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.

Anchor to apiKey
apiKey
string
required

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

This needs to be provided by the app developer.

Anchor to appOrigins
appOrigins
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.

Anchor to debug
debug

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.

Anchor to disabledFeatures
disabledFeatures
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.

Anchor to locale
locale
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.

Examples
shopify.config.shop;
// => 'your-shop-name.myshopify.com'
Was this page helpful?