# Shopify (Access Token) (/docs/shopify-token)



The **Shopify (Access Token)** integration publishes EarlySEO articles as **Shopify blog posts** using the GraphQL Admin API with a custom app access token. This method does **not** require installing the EarlySEO Shopify app — you generate a token from your own custom app inside Shopify admin.

Walkthrough Video [#walkthrough-video]

Watch the full setup walkthrough:

<iframe width="100%" height="420" src="https://www.youtube.com/embed/11Xl1a0XR2s" title="Shopify Access Token Walkthrough" frameBorder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerPolicy="strict-origin-when-cross-origin" allowFullScreen />

If the video doesn't load above, open it directly: [https://www.youtube.com/watch?v=11Xl1a0XR2s](https://www.youtube.com/watch?v=11Xl1a0XR2s)

Prerequisites [#prerequisites]

* A Shopify store on any plan
* Admin access to your Shopify store
* At least one Blog created (**Online Store → Blog Posts**)
* An EarlySEO account

Setup [#setup]

1. Create a Legacy Custom App in Shopify [#1-create-a-legacy-custom-app-in-shopify]

1. In your Shopify admin go to **Settings → Apps and sales channels**
2. At the top, click **Develop apps**
3. If prompted, click **Allow custom app development** and confirm
4. Click **Create an app**, give it a name (e.g., "EarlySEO Publishing"), and click **Create app**
5. Go to the **Configuration** tab and click **Configure** next to **Admin API integration**
6. Search for and enable the following **Admin API access scopes**:
   * `write_content` — allows creating and updating blog posts
   * `read_content` — allows reading blogs and articles
7. Click **Save**
8. Go to the **API credentials** tab and click **Install app**, then confirm
9. Under **Admin API access token**, click **Reveal token once** and copy it

> **Note:** This uses Shopify's **legacy custom app** flow under Settings → Apps, not the new Shopify Partners developer dashboard. The access token is only shown once — store it safely.

2. Create the Integration in EarlySEO [#2-create-the-integration-in-earlyseo]

1. Go to **Integrations** in your EarlySEO dashboard
2. Click **Add Integration** and select **Shopify (Access Token)**
3. Enter your **Shop Domain** (e.g., `your-store.myshopify.com`)
4. Paste your **Admin API Access Token**
5. Click **Validate Token** — EarlySEO verifies the token and loads your blogs
6. Select which **Blog** to publish articles into
7. Choose a **Publishing Status** (Active or Draft)
8. Click **Connect**

3. Configure Settings [#3-configure-settings]

| Field                      | Description                                                  |
| -------------------------- | ------------------------------------------------------------ |
| **Shop Domain**            | Your Shopify store domain (e.g., `your-store.myshopify.com`) |
| **Admin API Access Token** | Token from your custom app (starts with `shpat_`)            |
| **Blog**                   | The blog to publish articles into                            |
| **Publish Status**         | **Active** (published immediately) or **Draft**              |

How It Works [#how-it-works]

EarlySEO uses the Shopify [GraphQL Admin API](https://shopify.dev/docs/api/admin-graphql) to publish articles:

* **New articles** are created with [`articleCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/articlecreate)
* **Updated articles** are updated with [`articleUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/articleUpdate)
* Articles are matched by **handle** (URL slug) — if an article with the same slug already exists, it will be updated instead of duplicated

Publishing Behavior [#publishing-behavior]

| Status     | Blog Post State                                     |
| ---------- | --------------------------------------------------- |
| **Active** | Post is live immediately on your Shopify store      |
| **Draft**  | Post is saved as a draft — review before going live |

Shopify vs Shopify (Access Token) [#shopify-vs-shopify-access-token]

| Feature            | Shopify (App)                      | Shopify (Access Token)                      |
| ------------------ | ---------------------------------- | ------------------------------------------- |
| **Authentication** | EarlySEO Shopify App (OAuth)       | Custom App access token                     |
| **Setup**          | Install app from Shopify App Store | Create custom app in admin                  |
| **API**            | REST Admin API                     | GraphQL Admin API                           |
| **Scopes**         | Managed by EarlySEO app            | You control scopes                          |
| **Best for**       | Quick setup                        | Full control, no third-party app dependency |

Troubleshooting [#troubleshooting]

**Token validation fails (401 / 403)**

* Ensure you're using the **Admin API access token** (not a Storefront API token)
* Confirm the custom app has `write_content` scope enabled
* Check that the app is installed (not just created)

**No blogs available after validating**

* Your store must have at least one Blog created under **Online Store → Blog Posts**
* The custom app must have `read_content` scope

**Posts appear in the wrong blog**

* Delete the integration and recreate it, selecting the correct blog

**"Access denied" errors during publish**

* The token may have been revoked — create a new custom app token
* Ensure the app still has `write_content` scope
