Generate Shopify Admin API access tokens in seconds via OAuth 2.0.
A lightweight Node.js tool that runs a local server, walks you through Shopify's OAuth flow, and hands you the access token — ready to use with the Admin API.
Built and maintained by Nodusworks — Shopify experts & custom app developers.
Browser ──► localhost:3000 ──► Shopify OAuth consent screen
│
User approves
│
localhost:3000/callback ◄──┘
│
Exchanges code for token
│
✅ Access token displayed
- You start a local server.
- It redirects you to Shopify's OAuth authorization page.
- You approve the permissions.
- Shopify redirects back with an authorization code.
- The server exchanges the code for a permanent access token.
- The token is displayed in your browser and terminal.
- Node.js v16 or higher — download
- A Shopify Partner account — partners.shopify.com
- A Shopify store (development or live) to install the app on
- Go to partners.shopify.com → Apps → Create app → Create app manually
- Give your app a name and click Create
- In the app settings, note down:
- Client ID (API key)
- Client secret
- In your app's settings page, go to App setup → URLs
- Set App URL to
http://localhost:3000 - Under Allowed redirection URL(s), add:
http://localhost:3000/callback - Save the changes
- In the Partner Dashboard, go to your app → API access (or Configuration)
- Add the scopes your app needs (e.g.,
read_products,write_products,read_orders) - Save
Full list of scopes: Shopify API access scopes documentation
git clone https://github.com/nodusworkscom/shopify-app-token-generator.git
cd shopify-app-token-generator
npm installCopy the example env file and fill in your credentials:
cp .env.example .envEdit .env:
SHOPIFY_API_KEY=your_client_id_here
SHOPIFY_API_SECRET=your_client_secret_here
SHOPIFY_SHOP=your-store.myshopify.com
SHOPIFY_SCOPES=read_products,write_productsImportant: The scopes in
.envmust match the scopes you configured in the Partner Dashboard (step 3).
npm startOpen http://localhost:3000 in your browser. You'll be redirected to Shopify's authorization screen.
- Click Install app on the Shopify consent screen
- You'll be redirected back — the access token will appear:
- In your browser on the success page
- In your terminal output
- Copy the token and share it with your developer
- Press
Ctrl+Cto stop the server
Note: The access token is permanent (offline access) and does not expire unless the app is uninstalled.
Q: I get "HMAC validation failed"
A: Make sure your Client Secret in .env is correct and matches the app in your Partner Dashboard.
Q: I get "invalid_request" from Shopify
A: Verify that http://localhost:3000/callback is added as an Allowed Redirection URL in your app settings.
Q: Can I use this for multiple stores?
A: Yes! Just change SHOPIFY_SHOP in .env to a different store domain, install the app on that store, and run the server again.
Tarayıcı ──► localhost:3000 ──► Shopify OAuth yetkilendirme sayfası
│
Kullanıcı onaylar
│
localhost:3000/callback ◄───┘
│
Kodu token ile değiştirir
│
✅ Access token ekranda görünür
- Yerel bir sunucu başlatırsınız.
- Shopify'ın OAuth yetkilendirme sayfasına yönlendirilirsiniz.
- İzinleri onaylarsınız.
- Shopify sizi geri yönlendirir ve bir yetkilendirme kodu gönderir.
- Sunucu bu kodu kalıcı bir access token ile değiştirir.
- Token hem tarayıcıda hem terminalde görünür.
- Node.js v16 veya üzeri — indir
- Shopify Partner hesabı — partners.shopify.com
- Uygulamayı kuracağınız bir Shopify mağazası (geliştirme veya canlı)
- partners.shopify.com → Apps → Create app → Create app manually
- Uygulamaya bir isim verin ve Create butonuna tıklayın
- Uygulama ayarlarından şunları not edin:
- Client ID (API anahtarı)
- Client secret (gizli anahtar)
- Uygulama ayarlarında App setup → URLs bölümüne gidin
- App URL alanına
http://localhost:3000yazın - Allowed redirection URL(s) kısmına şunu ekleyin:
http://localhost:3000/callback - Kaydedin
- Partner Dashboard'da uygulamanıza gidin → API access (veya Configuration)
- İhtiyacınız olan scope'ları ekleyin (ör:
read_products,write_products,read_orders) - Kaydedin
Tüm scope listesi: Shopify API erişim kapsamları dokümantasyonu
git clone https://github.com/nodusworkscom/shopify-app-token-generator.git
cd shopify-app-token-generator
npm installÖrnek env dosyasını kopyalayın ve bilgilerinizi girin:
cp .env.example .env.env dosyasını düzenleyin:
SHOPIFY_API_KEY=client_id_buraya
SHOPIFY_API_SECRET=client_secret_buraya
SHOPIFY_SHOP=magazaniz.myshopify.com
SHOPIFY_SCOPES=read_products,write_productsÖnemli:
.envdosyasındaki scope'lar, Partner Dashboard'da (3. adım) ayarladığınız scope'larla aynı olmalıdır.
npm startTarayıcınızda http://localhost:3000 adresini açın. Shopify'ın yetkilendirme ekranına yönlendirileceksiniz.
- Shopify onay ekranında Install app butonuna tıklayın
- Geri yönlendirileceksiniz — access token görünecek:
- Tarayıcıda başarı sayfasında
- Terminalde çıktı olarak
- Token'ı kopyalayın ve geliştiriciye iletin
- Sunucuyu durdurmak için
Ctrl+Ctuşlayın
Not: Access token kalıcıdır (offline access) ve uygulama mağazadan kaldırılmadığı sürece süresi dolmaz.
S: "HMAC validation failed" hatası alıyorum
C: .env dosyasındaki Client Secret'ınızın Partner Dashboard'daki uygulama ile eşleştiğinden emin olun.
S: Shopify'dan "invalid_request" hatası alıyorum
C: Uygulama ayarlarınızda http://localhost:3000/callback adresinin izin verilen yönlendirme URL'lerine eklendiğini doğrulayın.
S: Birden fazla mağaza için kullanabilir miyim?
C: Evet! .env dosyasında SHOPIFY_SHOP değerini farklı bir mağaza alan adıyla değiştirin, uygulamayı o mağazaya kurun ve sunucuyu tekrar başlatın.
MIT — see LICENSE for details.
Built with ❤️ by Nodusworks — Shopify development, custom apps & integrations.