Skip to main content

Manage App Automation Tokens

App Automation Tokens let you authenticate Shopify CLI in non-interactive environments like CI/CD pipelines. You can use App Automation Tokens to programmatically deploy your app configuration and extensions using the deploy command.

Each App Automation Token is scoped to the specific app where it was created. A token can only be used to deploy the app it belongs to, and it can't access or modify other apps in your organization.

To learn how to integrate App Automation Tokens into your CI/CD pipeline, refer to Deploy app components in a CD pipeline.


Anchor to Create an App Automation TokenCreate an App Automation Token

  1. Open your app in the Dev Dashboard.
  2. Go to Settings.
  3. In the App Automation Token section, click Create token.
  4. From the Expiration drop-down list, select an expiration period (1 month, 3 months, or 6 months).
  5. Click Generate token.
  6. Copy the token value immediately.
  7. Where possible, protect the token by masking it or storing it as a secret in your CI/CD provider.
Caution

For security reasons, the token is only visible immediately after it's created. If you lose your token, you'll need to revoke it and generate a new one.


Anchor to Use an App Automation Token in your CI/CD pipelineUse an App Automation Token in your CI/CD pipeline

Set the token as the SHOPIFY_APP_AUTOMATION_TOKEN environment variable in your CI/CD provider. Shopify CLI automatically uses this variable to authenticate when running commands in non-interactive environments.

export SHOPIFY_APP_AUTOMATION_TOKEN=your-token-value
shopify app deploy --config production --allow-updates

For full CI/CD setup instructions and examples for GitHub Actions and CircleCI, refer to Deploy app components in a CI/CD pipeline.


Anchor to Rotate an App Automation TokenRotate an App Automation Token

App Automation Tokens have an expiration date. To avoid downtime in your CI/CD pipelines, you should rotate your token before it expires. The Dev Dashboard provides a built-in rotation workflow that lets you transition smoothly without breaking your deployments.

  1. Open your app in the Dev Dashboard.
  2. Go to Settings.
  3. In the App Automation Token section, click Rotate. This option is only available to existing tokens.
  4. Select an expiration period for the new token and click Generate token.
  5. Copy the new token and update your CI/CD environment variables with the new value.
  6. After you've confirmed that your pipelines work with the new token, click Revoke next to the old token to remove it. During rotation, both the old and new tokens are valid at the same time and will remain valid until you revoke them. This gives you a window to update all of your CI/CD environments without any authentication failures.

Anchor to Migrate from Partner Dashboard tokensMigrate from Partner Dashboard tokens

Partner Dashboard tokens were previously created in the Partner Dashboard and used the SHOPIFY_CLI_PARTNERS_TOKEN environment variable. Tokens are now created in the Dev Dashboard and use the SHOPIFY_APP_AUTOMATION_TOKEN environment variable.

Tokens created in Partner Dashboard will continue to work until they expire. You can revoke existing tokens in Partner Dashboard, but you can no longer create new tokens there.

To migrate:

  1. Create a new App Automation Token in the Dev Dashboard.
  2. Update your CI/CD pipeline's environment variable from SHOPIFY_CLI_PARTNERS_TOKEN to SHOPIFY_APP_AUTOMATION_TOKEN.
  3. After you've confirmed the new token works, revoke your old Partner Dashboard token.

Was this page helpful?