| name | shopify-install-auth |
| description | Install and configure Shopify app authentication with OAuth, session tokens, and the @shopify/shopify-api SDK.
Use when setting up a new Shopify app, configuring API credentials,
or initializing authentication for Admin or Storefront API access.
Trigger with phrases like "install shopify", "setup shopify",
"shopify auth", "shopify OAuth", "configure shopify API".
|
| allowed-tools | Read, Write, Edit, Bash(npm:*), Bash(pnpm:*), Bash(npx:*), Grep |
| version | 2.7.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","ecommerce","shopify"] |
| compatibility | Designed for Claude Code |
Shopify Install & Auth
Overview
Set up Shopify app authentication using the official @shopify/shopify-api library. Covers OAuth flow, session token exchange, custom app tokens, and Storefront API access.
Prerequisites
- Node.js 18+ (the
@shopify/shopify-api v9+ requires it)
- A Shopify Partner account at https://partners.shopify.com
- An app created in the Partner Dashboard with API credentials
- A development store for testing
Instructions
Step 1: Install the Shopify API Library
npm install @shopify/shopify-api @shopify/shopify-app-remix
npm install @shopify/shopify-api @shopify/shopify-app-express
npm install @shopify/shopify-app-remix @shopify/app-bridge-react
Step 2: Configure Environment Variables
Create a .env file (add to .gitignore immediately):
SHOPIFY_API_KEY=your_app_api_key
SHOPIFY_API_SECRET=your_app_api_secret
SHOPIFY_SCOPES=read_products,write_products,read_orders,write_orders
SHOPIFY_APP_URL=https://your-app.example.com
SHOPIFY_HOST_NAME=your-app.example.com
SHOPIFY_ACCESS_TOKEN=shpat_xxxxxxxxxxxxxxxxxxxxx
SHOPIFY_API_VERSION=2025-04
.env
.env.local
.env.*.local
Step 3: Initialize the Shopify API Library
import "@shopify/shopify-api/adapters/node";
import { shopifyApi, LATEST_API_VERSION, Session } from "@shopify/shopify-api";
shopify = ({
: process..!,
: process..!,
: process..!.(),
: process..!,
: ,
: ,
});
shopify;