Skip to main content

App configuration

You can configure your apps locally with TOML files, then link them to apps in your Partner Dashboard and deploy your changes using Shopify CLI. You can also configure most of this configuration through the Partner Dashboard. The configuration in the Partner Dashboard always reflects the active version of your app.

Note

For app configuration changes to take effect, you need to run the deploy command.

Learn more about managing app configuration files.

Caution

The shopify app config push Shopify CLI command is no longer supported. If you're using this command in your workflow, follow these steps to update app configuration with the deploy command.


Anchor to App configuration file exampleApp configuration file example

shopify.app.config-name.toml

name = "Example App"
client_id = "a61950a2cbd5f32876b0b55587ec7a27"
application_url = "https://www.app.example.com/"
embedded = true
handle = "example-app"

[access_scopes]
scopes = "read_products"

[access.admin]
direct_api_mode = "online"

[auth]
redirect_urls = [
"https://app.example.com/api/auth/callback",
"https://app.example.com/api/auth/oauth/callback",
]

[webhooks]
api_version = "2024-01"

[[webhooks.subscriptions]]
topics = [ "app/uninstalled" ]
compliance_topics = [ "customers/redact", "customers/data_request", "shop/redact" ]
uri = "/webhooks"

[app_proxy]
url = "https://app.example.com/api/proxy"
subpath = "store-pickup"
prefix = "apps"

[pos]
embedded = false

[app_preferences]
url = "https://www.app.example.com/preferences"

[build]
automatically_update_urls_on_dev = false
include_config_on_deploy = true

Note

For app configuration changes to take effect, you need to run the deploy command.

PropertyRequired?ValueDescription
nameYesstringThe name of your app.
handleNostringThe URL slug of your app home, for example https://admin.shopify.com/store/your-store-name/apps/your-app-handle/app.

Warning: Updating the handle changes the admin URL that appears when you access your app from the side menu. As a result, any embedded app admin links will be broken.
client_idYesstringThe app's public identifier.
application_urlYesstring matching a valid URLThe URL of your app.

Note: If you're building an extension-only app, then your application_url will be set to https://shopify.dev/apps/default-app-home by default.
embeddedYesbooleanEmbedded apps let users interact with your app without leaving the context of Shopify.
extension_directoriesNoarray of string paths or glob patternsThe paths that Shopify CLI will search for app extensions.

When omitted, defaults to ["extensions/"].
web_directoriesNoarray of string paths or glob patternsThe paths that Shopify CLI will search for the web files of your app.

When omitted, defaults to the app root directory.

Define the permissions your app requests, as well as how the permissions are requested.

Note

For app configuration changes to take effect, you need to run the deploy command.

PropertyRequired?ValueDescription
scopesYesstring matching a comma-separated list of scopesAny access scopes that your app will request access to during the authorization process.

When a merchant installs your app with Shopify managed install, they're prompted to grant permission to all the access scopes that you defined in this field.

Learn how to manage access scopes for your app.
optional_scopesNoarray of string access scopesAny access scopes that your app can request dynamically after installation.

Learn how to manage access scopes for your app.
use_legacy_install_flowNobooleanWhen omitted or false, scopes are saved in your app's configuration, and are automatically requested when the app is installed on a store or when you update the scopes value. This is referred to as Shopify managed installation.

When true, the legacy installation flow requests scopes through a URL parameter during the OAuth flow. The legacy installation flow is still supported, but isn't recommended because your app can end up with different scopes for each installation.

Settings for defining the ways that your app can access Shopify APIs.

Note

For app configuration changes to take effect, you need to run the deploy command.

PropertyRequired?ValueDescription
direct_api_modeNostring matching online or offlineThe access mode that Direct API access will use.

When online, Direct API access is enabled and uses an online access token.

When offline, Direct API access is enabled and uses an offline access token.

When omitted, defaults to online.
embedded_app_direct_api_accessNobooleanWhether your embedded app has access to Direct API access for calling Admin GraphQL APIs.

When omitted or false, Direct API access is disabled for embedded apps.

When true, Direct API is enabled and uses the mode defined by direct_api_mode.

Note

For app configuration changes to take effect, you need to run the deploy command.

PropertyRequired?ValueDescription
redirect_urlsYesarray of strings matching a valid URLUsers are redirected to these URLs as part of authorization code grant. You must include at least one redirect URL before making your app public. Learn more about redirection URLs.

Note

For app configuration changes to take effect, you need to run the deploy command.

PropertyRequired?ValueDescription
api_versionYesstring matching a valid Shopify version (example: 2022-10)The API version used to serialize webhooks and cloud service events.

Subscribe your app to Shopify webhook topics so that your app is alerted when an event occurs on a merchant's store. Learn more about webhook subscriptions.

Note

For app configuration changes to take effect, you need to run the deploy command.

PropertyRequired?ValueDescription
topicsYesarray of strings matching a valid topicThe topics that your app subscribes to. Refer to a complete list of topics in the webhooks reference.
compliance_topicsNoarray of strings matching a valid compliance topicThe topics to manage the requests to view or erase customer personal information. Valid options: customers/redact, customers/data_request or shop/redact. These are required topics to subscribe to for all apps distributed in the Shopify App Store.
uriYesstring matching a valid URIYour app's endpoint to handle the events. It can be a HTTPS URL, a relative path starting with a slash, a Google Pub/Sub URI or an Amazon EventBridge Amazon Resource Name (ARN).
filterNostringA set of rules specified using Shopify API's Search Syntax. Ensures only webhooks that match the filter are delivered. Learn more.
include_fieldsNoarray of stringsSpecifies the fields that will be sent in a webhook's event message. If null, then all fields will be sent. Learn more.
Info

The following is the structure of the URL you should use for the URI when working with Google Cloud Pub/Sub:

pubsub://{project-id}:{topic-id}

Where {project-id} is the ID of your Google Cloud Platform project, and {topic-id} is the ID of the topic that you set up in Google Cloud Pub/Sub.

For Amazon EventBridge, your URL will be similar to the following example:

arn:aws:events:<aws_region>::event-source/aws.partner/shopify.com/<app_id>/<event_source_name>

Let Shopify act as a proxy when sending requests to your app. Learn more about app proxy.

Note

For app configuration changes to take effect, you need to run the deploy command.

PropertyRequired?ValueDescription
urlYes if app_proxy definedstring matching a valid URLURL of your app proxy server
subpathYes if app_proxy definedstring containing letters, numbers, underscores, and hyphens up to 30 characters. The value may not be admin, services, password, or login.The combination of prefix and subpath defines where the app proxy is accessed from a merchant's shop.
prefixYes if app_proxy definedstring matching a, apps, community, or toolsThe combination of prefix and subpath defines where the app proxy is accessed from a merchant's shop.

Note

For app configuration changes to take effect, you need to run the deploy command.

PropertyRequired?ValueDescription
embeddedNobooleanLoad your app in Shopify POS using Shopify App Bridge. Learn more.

Note

For app configuration changes to take effect, you need to run the deploy command.

PropertyRequired?ValueDescription
urlNostring matching a valid URLURL for your app's preferences page

Note

For app configuration changes to take effect, you need to run the deploy command.

Settings for running your app through Shopify CLI.

PropertyRequired?ValueDescription
automatically_update_urls_on_devNobooleanWhen true, your app URL and redirect URLs will be automatically updated on dev. This is useful when using the built-in tunnel for development.

When false, your URLs won't be updated on dev. Recommended for production apps.

When omitted, you will be prompted to choose an option on dev.
include_config_on_deployNobooleanSoon, this will no longer be optional and configuration will be included on every deploy.

When true, your local app configuration will be included in the app version created on deploy. Recommended for all apps.

When omitted or false, your app configuration won't be updated on deploy. The active configuration will be re-used in the new app version. Not recommended, since you can only update app configuration from the Partner Dashboard.
dev_store_urlNostring matching a valid store URLThe name of the dev store used to preview your app.

Anchor to Migrate from config pushMigrate from config push

The shopify app config push Shopify CLI command is no longer supported. Instead, you can release your app configuration and extensions together with the deploy command.

Anchor to Migrate interactivelyMigrate interactively

If you use the shopify app config push command without the --force flag, then follow these steps to migrate to the deploy command:

  1. Upgrade Shopify CLI to the latest version.
  2. Remove all references to the shopify app config push command in any scripts or aliases.
  3. When you're ready to deploy both app configuration and all extensions, run the deploy command.

Terminal

shopify app deploy
  1. Shopify CLI will ask if you want to start including app configuration on deploy. Answer Yes, always, and your choice will be saved in your app configuration file.
  2. Continue the rest of the deploy flow to release a new app version to users.
  3. Push your app configuration file to source control, so all contributors use the same app configuration. This ensures that the app and Shopify CLI commands behave the same way in each contributor's environment.

Anchor to Update your CI/CD workflowUpdate your CI/CD workflow

If you use the shopify app config push with the --force flag, follow these steps to migrate to the deploy command:

  1. Upgrade Shopify CLI to the latest version.
  2. Remove all references to the shopify app config push command.
  3. Add the line include_config_on_deploy = true to the [build] section in your app configuration file. Once set, both app configuration and extensions will be included when you deploy.

shopify.app.config-name.toml

[build]
include_config_on_deploy = true
  1. Add the deploy command with the --force flag to your workflow, if it's not there already. Refer to the example workflows for more details.

Was this page helpful?