Skip to content
Go back

How to Get a Shopify Admin API Access Token

Saad Saif - Shopify Expert

Need Help With Your Shopify Store?

I'm a Shopify expert developer working as a solo specialist. When you reach out, you work directly with me, no project managers or middlemen.

If you need help with Shopify development, improving conversions, or increasing your store’s average order value, feel free to message me on WhatsApp for a quick response.

We can work through Upwork or you can pay securely via Payoneer.

Message me on WhatsApp

How to Get a Shopify Admin API Access Token

If you want to interact with the Shopify Admin API, to read or write products, metaobjects, files, and more, you need an access token. This guide walks you through the full OAuth flow: creating a custom app in the Shopify Partner dashboard, getting an authorization code, and exchanging it for a token using Postman.


Step 1: Create a Custom App in the Shopify Partner Dashboard

  1. Go to your Shopify Partner DashboardAppsCreate app.
  2. Choose Create app manually.
  3. Give it a name (e.g. “Admin API Tool”).
  4. Under Configuration, set the App URL and Allowed redirection URL(s). For local testing, use:
    http://localhost
  5. Under API scopes, select all the permissions you need. Common ones:
    • write_products
    • write_product_listings
    • write_files
    • write_metaobject_definitions
    • write_metaobjects
  6. Save the app. Copy the Client ID and Client Secret, you will need both in the next steps.

Step 2: Request Authorization (Get the Code)

Open your browser and navigate to the following URL, replacing the placeholders with your actual values:

https://YOUR-STORE.myshopify.com/admin/oauth/authorize?client_id=YOUR_CLIENT_ID&redirect_uri=http://localhost

Example:

https://saad0011.myshopify.com/admin/oauth/authorize?client_id=ee54bec3ce22bceee7dcf86de570cbb2&redirect_uri=http://localhost

The redirect URL will look like this:

http://localhost/?code=3bb6b41a3aec7c6189473880ff0b2a21&hmac=d6981f1fcf232527f922...&shop=saad0011.myshopify.com&timestamp=1771396570

Copy the code parameter from the URL. This is your one-time authorization code.


Step 3: Exchange the Code for an Access Token (Using Postman)

Now make a POST request to exchange the authorization code for a permanent access token.

Endpoint:

POST https://YOUR-STORE.myshopify.com/admin/oauth/access_token

Query Parameters:

KeyValue
client_idYour app’s Client ID
client_secretYour app’s Client Secret
codeThe code from Step 2

Example in Postman:

Hit Send. The response will be a JSON object:

{
  "access_token": "shpca_************************",
  "scope": "write_files,write_metaobject_definitions,write_metaobjects,write_product_listings,write_products"
}

Save your access_token, this is what you will pass in the X-Shopify-Access-Token header for all subsequent Admin API requests.


Step 4: Make Authenticated API Requests

With your access token, you can now call any Admin API endpoint your scopes allow. Example using curl:

curl -X GET \
  "https://saad0011.myshopify.com/admin/api/2024-01/products.json" \
  -H "X-Shopify-Access-Token: shpca_************************"

Or in Postman, add a header:


Important Notes


That’s it! You now have a Shopify Admin API access token you can use to automate tasks, sync data, or build integrations. Need help with the next step? Message me on WhatsApp anytime.


Video Tutorial

Watch the step-by-step video tutorial here:

Custom Product Labels and Badges in Shopify


Reviews

☆☆☆☆☆ No reviews yet

Saad Saif - Shopify Expert

Need Help With Your Shopify Store?

I'm a Shopify expert developer working as a solo specialist. When you reach out, you work directly with me, no project managers or middlemen.

If you need help with Shopify development, improving conversions, or increasing your store’s average order value, feel free to message me on WhatsApp for a quick response.

We can work through Upwork or you can pay securely via Payoneer.

Message me on WhatsApp

Share this post on:

Next Post
Create Wishlist in Shopify without using APP
WhatsApp