# Shopify

> Source: https://truto.one/docs/integration-guides/shopify/

Connect a Shopify store to Truto with OAuth 2.0 through a Shopify app you own.

## Install the Shopify integration

Install Shopify from [Available integrations](https://app.truto.one/integrations/available/588fe815-8967-4d4d-a69e-2d2613d1c6e4) in each environment you connect accounts from.

## Create a Shopify OAuth app

Truto doesn't ship a Shopify OAuth app of its own, so bring yours. Until you set its Client ID and Client Secret on the installed integration, the connect UI doesn't list Shopify. See [Until the app is configured](/docs/guides/integrations/overriding-oauth-credentials#until-the-app-is-configured).

1. In Shopify's [Dev Dashboard](https://shopify.dev/docs/apps/build/dev-dashboard/create-apps-using-dev-dashboard), open **Apps** and click **Create app**. Choose **Start from Dev Dashboard**, enter a name and click **Create**.
2. On the app's **Versions** page, create a version:
   - Under **Scopes**, add the scopes listed below. If you override the scopes on the Truto integration, add those instead.
   - Under **Redirect URLs**, add the redirect URL below.
   - Click **Release**. Shopify applies redirect URLs only once they are part of a released version.
3. Open **App settings**. The **Credentials** card shows the **Client ID** and **Client secret**. Enter them on the installed Shopify integration; see [Overriding OAuth credentials](/docs/guides/integrations/overriding-oauth-credentials#steps-to-overriding-oauth).

Redirect URL:

```text
https://api.truto.one/connect/shopify/callback
```

If you [use a redirect URL on your own domain](/docs/guides/integrations/overriding-oauth-credentials#use-a-redirect-url-on-your-own-domain), register that URL instead.

By default, Truto asks Shopify for these scopes. The connect screen lists them under **Permissions required**, and you can change them when you override the OAuth credentials.

- `read_orders`
- `read_customers`
- `read_products`
- `read_users`

## Find the store's subdomain

1. Sign in to the Shopify admin of the store.
2. Click **Settings** in the bottom-left corner.
   ![Click Settings](https://docs-assets.truto.one/shopify-details-1.png)
3. Open **Store details**. The store's `myshopify.com` address is listed there.
   ![Store details](https://docs-assets.truto.one/shopify-details-2.png)

## Connect a Shopify account

1. Click **Connect Account**.
   ![Click Connect Account](https://docs-assets.truto.one/truto-connect-account.png)
2. Enter a Tenant ID. This can be any ID you choose. Click **Get connection link**.
   ![Get connection link](https://docs-assets.truto.one/truto-connect-account-modal.png)
3. Open the generated link. You can also share it with your customer so they connect their own Shopify account.
   ![Share connection link](https://docs-assets.truto.one/truto-connect-account-link.png)
4. Select **Shopify**.
5. Fill in the form and click **Connect**:

   | Field | Required | What to enter |
   |---|---|---|
   | **Shop** | Yes | The store's subdomain: for `acme.myshopify.com`, enter `acme`. See [Find the store's subdomain](#find-the-stores-subdomain). |
6. Sign in to Shopify and allow access.
7. Close the tab when you see the connection successful message. The new account appears under **Integrated Accounts**. Click its Account ID to see its details and make API calls.
