---
title: "接続情報 - Shopify | TROCCO Docs"
slug: "connection-configuration-shopify-graphql"
updated: 2025-12-17T09:48:58Z
published: 2025-12-17T09:48:58Z
canonical: "documents.trocco.io/connection-configuration-shopify-graphql"
---

> ## Documentation Index
> Fetch the complete documentation index at: https://documents.trocco.io/llms.txt
> Use this file to discover all available pages before exploring further.

# 接続情報 - Shopify

本ページでは、Shopifyに接続するための設定（接続情報）について説明します。 転送に関する設定については、[転送元 - Shopify](/docs/data-source-shopify-graphql)を参照ください。

## Shopify側で必要な作業

TROCCOからShopifyのデータを取得するには、Shopify側でカスタムアプリを作成し、APIアクセストークンを取得する必要があります。

カスタムアプリの作成方法は以下の2種類があります。

| 作成方法 | 概要 | 推奨 |
| --- | --- | --- |
| [Dev Dashboard経由で作成](/docs/connection-configuration-shopify-graphql#dev-dashboard%E3%81%A7%E3%82%AB%E3%82%B9%E3%82%BF%E3%83%A0%E3%82%A2%E3%83%97%E3%83%AA%E3%82%92%E4%BD%9C%E6%88%90%E3%81%99%E3%82%8B) | Shopify Dev Dashboardからアプリを作成する方法 | ✓ |
| [Shopify管理画面で作成](/docs/connection-configuration-shopify-graphql#shopify%E7%AE%A1%E7%90%86%E7%94%BB%E9%9D%A2%E3%81%A7%E3%82%AB%E3%82%B9%E3%82%BF%E3%83%A0%E3%82%A2%E3%83%97%E3%83%AA%E3%82%92%E4%BD%9C%E6%88%90%E3%81%99%E3%82%8B) | Shopify管理画面から直接アプリを作成する方法（レガシー） | - |

              Shopify管理画面でのカスタムアプリ作成の廃止について

              

2026年1月1日以降、Shopify管理画面から新規でカスタムアプリを作成できなくなります。 新規でカスタムアプリを作成する場合は、Dev Dashboard経由での作成を推奨します。 既存のカスタムアプリは引き続き利用できます。 詳しくは[Shopify Changelog - Legacy custom apps can't be created after January 1, 2026](https://changelog.shopify.com/posts/legacy-custom-apps-can-t-be-created-after-january-1-2026)を参照ください。

### Dev Dashboardでアプリを作成する

Dev Dashboardを使用してカスタムアプリを作成し、認証情報を取得する手順を説明します。

#### 1. Dev Dashboardにアクセスする

[Shopify Dev Dashboard](https://dev.shopify.com/dashboard)にアクセスします。

#### 2. アプリを作成する

1. 左パネルの**Apps**を選択し、**Create app**をクリックします。

![](https://cdn.document360.io/3a3bae1e-f157-487f-8798-01e9d820e760/Images/Documentation/connection-configuration-shopify-graphql-2025-12-15-16-30-1.png)

1. **Start from Dev Dashboard** にアプリ名を入力し、**Create**をクリックします。

![](https://cdn.document360.io/3a3bae1e-f157-487f-8798-01e9d820e760/Images/Documentation/connection-configuration-shopify-graphql-2025-12-15-16-30-2.png)

#### 3. アプリの詳細を設定する

1. 作成直後の画面の**URLs**セクション > **App URL**にTROCCOのShopify接続情報一覧ページのURL(`https://trocco.io/connections?connection_type=shopify_graphql`) を設定し、**Embed app in Shopify admin** のチェックを外します。

![](https://cdn.document360.io/3a3bae1e-f157-487f-8798-01e9d820e760/Images/Documentation/connection-configuration-shopify-graphql-2025-12-15-16-30-3.png)

1. **Access** セクションで、必要なAPIスコープを選択します。  

ターゲットごとに必要となるスコープは、[スコープの付与](/docs/connection-configuration-shopify-graphql#%E3%82%B9%E3%82%B3%E3%83%BC%E3%83%97%E3%81%AE%E4%BB%98%E4%B8%8E)を参照ください。

![](https://cdn.document360.io/3a3bae1e-f157-487f-8798-01e9d820e760/Images/Documentation/connection-configuration-shopify-graphql-2025-12-15-16-30-4.png)

1. **Release** をクリックしてバージョンをリリースします。

**Version name**および**Version message**は任意入力です。

#### 4. 認証情報を取得する

1. リリース後、左パネルの**Settings**をクリックし、**Credentials**セクションの**Client ID**と**Secret**をメモします。

![](https://cdn.document360.io/3a3bae1e-f157-487f-8798-01e9d820e760/Images/Documentation/connection-configuration-shopify-graphql-2025-12-15-16-30-5.png)

              Client secretの取り扱い

              

Client secretは機密情報です。安全な場所に保管し、第三者に公開しないでください。

### Shopify Partnerでアプリの設定をする

              Shopify Partnerアカウントについて

              

Shopifyのアカウントやストアとは別にShopify Partner Program(無料)への登録が必要になります。 本来Shopifyのストア構築支援などで利用するプラットフォームですが、カスタムアプリのAPIアクセス設定のために必要となります。

#### 1. 配布方法を選択する

Dev Dashboardの**Settings**にある**Storefront API**からリンクを開くと、Shopify Partner上のアプリ設定に遷移しますので、そちらで設定を続行します。

![](https://cdn.document360.io/3a3bae1e-f157-487f-8798-01e9d820e760/Images/Documentation/connection-configuration-shopify-graphql-2025-12-15-16-30-6.png)

1. 左パネルの**配布**から**カスタム配布**を選択し、**選択**をクリックします。

![](https://cdn.document360.io/3a3bae1e-f157-487f-8798-01e9d820e760/Images/Documentation/connection-configuration-shopify-graphql-2025-12-15-16-30-7.png)

              カスタム配布について

              

カスタム配布を選択することで、顧客情報へのアクセスが自動承認されます。 詳細は[Work with protected customer data](https://shopify.dev/docs/apps/launch/protected-customer-data) をご参照ください。

1. 確認ダイアログが出てきますので、**カスタム配布を選択**をクリックします。
2. 選択後のページにて、インストール先となるストアドメインを入力、必要に応じて**1つのPlus組織に対して複数のストアのインストール**にチェックを入れ、**リンクを生成**をクリックします。

![](https://cdn.document360.io/3a3bae1e-f157-487f-8798-01e9d820e760/Images/Documentation/connection-configuration-shopify-graphql-2025-12-15-16-30-8.png)

1. 生成されたインストールリンクをメモします。

APIアクセスのリクエスト後、ストアにアプリをインストールする際にクリックして利用します。

#### 2. APIアクセスをリクエストする

商品情報や60日以上前の注文データを取得するには、Shopify Partnerで追加のAPIアクセスをリクエストする必要があります。

| リクエスト項目 | 説明 | 対象となるターゲット |
| --- | --- | --- |
| Storefront API | 商品情報を含むストアフロント向けのデータアクセス | `products` など商品情報を含むターゲット |
| すべての注文範囲を読み込む | 60日以上前の注文データへのアクセス権限 | `orders`、`order_line_items`など注文関連のターゲット |

配布方法選択後、左パネルの**APIアクセス要求**から設定します。

1. **Storefront APIを有効にする** をクリックします。

![](https://cdn.document360.io/3a3bae1e-f157-487f-8798-01e9d820e760/Images/Documentation/connection-configuration-shopify-graphql-2025-12-15-16-30-9.png)

1. **すべての注文範囲を読み込む** セクションの**アクセス権をリクエスト**をクリックします。

![](https://cdn.document360.io/3a3bae1e-f157-487f-8798-01e9d820e760/Images/Documentation/connection-configuration-shopify-graphql-2025-12-15-16-30-10.png)

1. **アプリが60日より前の注文にアクセスする必要があるのはなぜですか？** の項目に理由を入力し、**アクセス権をリクエスト**をクリックします。

自動承認されますので、「分析にて長期間の注文データを必要とします」のような理由で十分です。

![](https://cdn.document360.io/3a3bae1e-f157-487f-8798-01e9d820e760/Images/Documentation/connection-configuration-shopify-graphql-2025-12-15-16-30-11.png)

### アプリをストアにインストールする

1. メモしたインストールリンクを開き、インストール対象のストアを選択します。
2. アプリ作成時に設定したTROCCOの接続情報ページが表示されたら完了です。

### Shopify管理画面でカスタムアプリを作成する

              レガシー方式

              

本手順は2026年1月1日以降、新規アプリの作成に使用できなくなります。 新規でカスタムアプリを作成する場合は、[Dev Dashboard経由でカスタムアプリを作成](/docs/connection-configuration-shopify-graphql#dev-dashboard%E7%B5%8C%E7%94%B1%E3%81%A7%E3%82%AB%E3%82%B9%E3%82%BF%E3%83%A0%E3%82%A2%E3%83%97%E3%83%AA%E3%82%92%E4%BD%9C%E6%88%90%E3%81%99%E3%82%8B)を推奨します。

Shopify管理画面を使用してカスタムアプリを作成し、アクセストークンを取得する手順を説明します。

1. [Shopifyの管理画面](https://admin.shopify.com/)にログインします。
2. **アプリ** > **アプリと販売チャネルの設定**をクリックします。 ![connection-configuration-shopify-graphql-2025-05-16-16-30-1.png](https://cdn.document360.io/3a3bae1e-f157-487f-8798-01e9d820e760/Images/Documentation/connection-configuration-shopify-graphql-2025-05-16-16-30-1.png)
3. **アプリを開発**をクリックします。 なお、本画面上に**ドメイン名**が表示されているので、メモしてください。 ドメイン名は接続情報を作成する際に必要となります。 ![connection-configuration-shopify-graphql-2025-05-16-16-30-2.png](https://cdn.document360.io/3a3bae1e-f157-487f-8798-01e9d820e760/Images/Documentation/connection-configuration-shopify-graphql-2025-05-16-16-30-2.png)

              「アプリを開発」ボタンが表示されない場合

              

アプリを開発する権限を持っていない場合、ボタンが表示されません。 アプリ開発の権限を持っているユーザーアカウントを利用するか、Shopifyアカウントを管理するユーザーに権限の付与を依頼してください。 アプリ開発の権限について、詳しくは[Shopify公式ドキュメント - カスタムアプリのAPIスコープ権限](https://help.shopify.com/manual/apps/app-types/custom-apps#api-scope-permissions-for-custom-apps)を参照ください。

1. **アプリを作成**をクリックし、アプリを作成します。 ![connection-configuration-shopify-graphql-2025-05-16-16-30-3.png](https://cdn.document360.io/3a3bae1e-f157-487f-8798-01e9d820e760/Images/Documentation/connection-configuration-shopify-graphql-2025-05-16-16-30-3.png)
2. **Admin APIスコープを設定する**をクリックし、必要となるスコープを追加して保存します。 ターゲットごとに必要となるスコープは異なります。詳しくは、[スコープの付与](/docs/connection-configuration-shopify-graphql#%E3%82%B9%E3%82%B3%E3%83%BC%E3%83%97%E3%81%AE%E4%BB%98%E4%B8%8E)を参照ください。
3. **アプリをインストール**をクリックし、アプリをインストールします。 ![connection-configuration-shopify-graphql-2025-05-16-16-30-4.png](https://cdn.document360.io/3a3bae1e-f157-487f-8798-01e9d820e760/Images/Documentation/connection-configuration-shopify-graphql-2025-05-16-16-30-4.png)
4. **Admin APIのアクセストークン**をメモします。 ![connection-configuration-shopify-graphql-2025-05-16-16-30-5.png](https://cdn.document360.io/3a3bae1e-f157-487f-8798-01e9d820e760/Images/Documentation/connection-configuration-shopify-graphql-2025-05-16-16-30-5.png)

### スコープの付与

ターゲットごとに必要となるスコープは異なります。

| 取得対象 | 必要となるスコープ | 補足 |
| --- | --- | --- |
| `abandoned_checkouts` | `read_orders` |  |
| `collections` | `read_products`, `read_publications`, `read_product_listings` |  |
| `customers` | `read_customers`, `read_orders` |  |
| `disputes` | `read_shopify_payments_disputes` |  |
| `draft_orders` | `read_draft_orders`, `read_payment_terms`, `read_customers`, `read_orders` |  |
| `fulfillment_line_items` | `read_orders` |  |
| `fulfillment_orders` | `read_assigned_fulfillment_orders` |  |
| `fulfillments` | `read_orders` |  |
| `inventory_item_country_harmonized_system_codes` | `read_inventory` |  |
| `inventory_items` | `read_inventory`, `read_products` |  |
| `locations` | `read_locations` |  |
| `metafields` | `read_orders`, `read_products`, `read_customers` |  |
| `order_agreements` | `read_orders` |  |
| `order_line_items` | `read_orders`, `read_products` |  |
| `order_refunds` | `read_orders` |  |
| `order_risks` | `read_orders` |  |
| `order_transactions` | `read_orders` |  |
| `orders` | `read_orders`, `read_customers`, `read_locations`, `read_marketing_events`, `read_payment_terms`, `read_shopify_payments_accounts` | `StaffMember`の`id`を取得データに含める場合は、以下の条件を両方満たす必要があります。 - `read_users`スコープの付与 - Advancedプラン以上の契約 |
| `product_variants` | `read_products`, `read_shipping`, `read_locations` |  |
| `products` | `read_products`, `read_publications`, `read_product_listings` |  |
| `refund_line_items` | `read_orders` |  |

#### すべてのスコープ

すべてのスコープを付与したい場合は、下記からコピーしてご利用ください。

```
read_assigned_fulfillment_orders,read_customers,read_draft_orders,read_inventory,read_locations,read_orders,read_marketing_events,read_payment_terms,read_product_listings,read_products,read_publications,read_shipping,read_shopify_payments_accounts,read_shopify_payments_disputes
```

## TROCCO側の設定項目

| 項目名 | 必須 | 内容 |
| --- | --- | --- |
| 名前 | ✓ | TROCCO内部で利用する接続情報の名前を入力します。 |
| メモ | - | TROCCO内部で利用する接続情報のメモを入力できます。 |
| ドメイン | ✓ | Shopifyのドメイン名を入力します。 |
| 認証タイプ | ✓ | 認証タイプを選択します。 - **OAuth 2.0 Client Credentials**：Dev Dashboard経由で作成したカスタムアプリを使用する場合に選択します。 - **Admin API アクセストークン**：Shopify管理画面で作成したカスタムアプリを使用する場合に選択します。 |
| クライアント ID | ✓ | 認証方式に**OAuth 2.0 Client Credentials**を選択した場合に表示されます。Dev Dashboardで取得したClient IDを入力します。 |
| クライアントシークレット | ✓ | 認証方式に**OAuth 2.0 Client Credentials**を選択した場合に表示されます。Dev Dashboardで取得したClient secretを入力します。 |
| アクセストークン | ✓ | 認証方式に**Admin API アクセストークン**を選択した場合に表示されます。Shopify管理画面で取得したAdmin APIのアクセストークンを入力します。 |
