← Integrations

Shopify

Read and manage a merchant's Shopify store: products, orders and customers.

  • E-commerce
  • OAuth 2.0
  • Works on Free plan
  • Bundled in Kirak
  • Maintained by Kirak
View on GitHub →

How to use it

This profile ships with Kirak. Add "integrations" to modules in kirak.json, then name the profile as below. There is nothing to download, and a copy in your project's integrations/ folder is an error.

Environment variables

VariableHolds
KIRAK_INTEGRATION_SHOPIFY_CLIENT_SECRETThe OAuth client secret from the vendor's console. Secret: keep it out of kirak.json and out of source control.
KIRAK_AUTH_ENCRYPTION_KEYSEncrypts stored tokens. Shared by every integration; the module refuses to start without it.

The names follow the integration's name in kirak.json (shopify here). Name it something else, such as shopify_sales, and the variables change to match.

Redirect URL

Register this as the redirect (callback) URL in the vendor's console, with your app's address in place of <your-app> (the base_url in kirak.json):

https://<your-app>/integrations/shopify/callback

How to get your keys

  1. In your Shopify developer dashboard, create an app.
  2. Set the allowed redirection URL to https://<your-app>/integrations/shopify/callback.
  3. Pick the access scopes your app needs. At least: read_products (Read products)
  4. Copy the client ID and the client secret.
  5. Put the client ID in kirak.json as integrations.providers.shopify.client_id, and the client secret in the environment as KIRAK_INTEGRATION_SHOPIFY_CLIENT_SECRET. Never put the secret in kirak.json.
  6. Each merchant connects their own shop: your app passes the shop name (the part before .myshopify.com) when it starts the connect.

The vendor's own guide · Instructions out of date? ·Suggest an edit

kirak.json

Scopes
{
  "integrations": {
    "providers": {
      "shopify": {
        "type": "oauth2",
        "profile": "shopify",
        "client_id": "your-client-id",
        "scope": [
          "read_products"
        ]
      }
    }
  }
}

Merged into the profile: scope replaces the profile's default scopes.

Settings

connect.shop
The shop's name: the part before .myshopify.com. Your app passes it when it starts the connect.

Good to know

  • The shop is given at connect time: connect.shop. The API host is the shop's own myshopify.com host.
  • The access token is non-expiring here. New public apps must request expiring offline tokens (expiring=1 on the token request), which this profile cannot add yet.
  • Not verified against the vendor docs in this session: check the facts before release.
Ask about Kirak on