How to Connect Shopify to API2Cart?
To connect Shopify to API2Cart, you pass the address of the store and an Admin API access token of a Shopify app installed on that store. This guide explains which Shopify apps can issue such a token today, how to get the token in your case and which scopes the app needs for API2Cart methods.
Credentials to connect Shopify to API2Cart
store_url– the address of the store: itsmyshopify.comaddress or the store's own domain.shopify_access_token– required. The Admin API access token of a Shopify app installed on the store. The sections below explain where to get it.shopify_shared_secret– optional. The client secret of the same app. Pass it if you use webhooks or Live Shipping Rates: API2Cart checks the signatures of Shopify requests with it, and live shipping services cannot be created without it. It can be passed withoutshopify_client_id.shopify_client_id– optional. The client ID of the app. Pass it only with a token from the client credentials grant, and always together withshopify_access_tokenandshopify_shared_secret: then API2Cart requests a new token itself when the current one expires.
Important: pass shopify_client_id only with a token from the client credentials grant. With a token that a merchant's store issued to your app, it does harm: when Shopify rejects the token, API2Cart tries to get a new one with the client credentials grant, Shopify refuses it for a store outside the app's organization, and the method returns Can't receive access token… instead of a clear error about the token.
Which Shopify app and access token to use
Since January 1, 2026, new custom apps can no longer be created in the Shopify admin. Apps created there before this date keep working, and API2Cart still accepts their tokens.
New apps are created in the Shopify Dev Dashboard. In this guide, Custom means the Custom distribution method of a Dev Dashboard app, not the legacy Custom app created in the store admin. How you get the token depends on whose store you connect:
- A store in your organization – the app and the store belong to the same organization in the Dev Dashboard. Install the app from the Installs card and get a token with the client credentials grant. Connect the store with
shopify_access_token,shopify_client_idandshopify_shared_secret, and API2Cart renews the token itself. See Connect a Shopify store in your organization. - A merchant's store – any other store. Choose Custom distribution, send the install link to the store owner and get a token with the authorization code grant. Connect the store with
shopify_access_tokenonly, and addshopify_shared_secretif you need webhooks or Live Shipping Rates. See Connect a merchant's Shopify store.
Create an app in the Shopify Dev Dashboard
Log in to the Dev Dashboard and click Create app.
Enter the app name in the App Name field.
In the Access section of the app version, click Select scopes and select the scopes that your API2Cart methods need. They are listed in the table of scopes below. Fill in Redirect URLs only if you connect a merchant's store: the authorization code grant sends the store owner back to one of these URLs.
Release the version. After that, the new app appears on the dashboard. To add scopes later, release a new version of the app with them and approve the update on the store.
The Client ID and Secret of the app are on its Settings page. You need them to request a token, and the Secret is also the value of shopify_shared_secret.
Add API2Cart IP addresses to the IP allowlist
Shopify can limit the addresses from which it accepts the tokens of an app. For an app installed on a store outside your organization, such an IP allowlist is required: from November 20, 2026, an app without it cannot be installed on such a store, and from January 1, 2027, every app already installed on such stores must have it. Shopify rejects requests from addresses that are not in the allowlist with the 403 status, so if the API2Cart addresses are missing there, API2Cart methods fail for the store.
- Open the app in the Dev Dashboard, click Settings, and then click Manage in the IP allowlist section.
- In IP addresses or CIDR ranges, enter all addresses from the list of API2Cart IP addresses, both IPv4 and IPv6. That page always holds the current list.
- If your own servers also call Shopify with the tokens of this app, add their addresses as well.
- Turn on Enforcement and click Save.
The page with the API2Cart IP addresses also suggests a firewall exception by User-Agent. It does not work for Shopify: Shopify checks only the IP address a request comes from.
For an app used only on stores in your organization, the allowlist is optional. If you turn it on, add the API2Cart addresses there as well.
Connect a Shopify store in your organization
Use this way when the app and the store belong to the same organization in the Dev Dashboard. On the app page, click Install app in the Installs card.
Select the store and confirm the installation.
Request an access token with the client credentials grant. Replace {store_url} with the myshopify.com address of the store, for example your-store.myshopify.com, and {client_id} and {client_secret} with the Client ID and Secret from the app settings:
curl --location 'https://{store_url}/admin/oauth/access_token' \
--header 'Content-Type: application/json' \
--data '{
"grant_type": "client_credentials",
"client_id": "{client_id}",
"client_secret": "{client_secret}"
}'
The response contains access_token, the list of granted scopes and expires_in. The token is valid for 24 hours (expires_in is 86399) and comes without a refresh token.
If Shopify answers with the shop_not_permitted error, the store does not belong to the organization of the app. Connect it as a merchant's store instead.
Connect the Shopify store to API2Cart with these parameters:
shopify_access_token– theaccess_tokenfrom the response;shopify_client_id– the Client ID of the app;shopify_shared_secret– the Secret of the app.
With shopify_client_id and shopify_shared_secret, API2Cart requests a new token itself when the current one expires. Without them, the token stops working after 24 hours, and API methods fail with authorization errors.
Connect a merchant's Shopify store
Use this way for a store that does not belong to the organization of the app. First, add the API2Cart IP addresses to the IP allowlist of the app.
On the app page, click Select distribution method in the Distribution card.
Choose Custom distribution.
Enter the domain of the merchant's store and generate the install link. An app with custom distribution can be installed on one store or, if you allow multi-store installs, on the stores of one Plus organization. Send the link to the store owner, who confirms the installation.
Then get an access token with the authorization code grant. Build the authorization URL:
https://{store_url}/admin/oauth/authorize?client_id={client_id}&scope={scopes}&redirect_uri={redirect_uri}&state={nonce}
Where:
{store_url}– themyshopify.comaddress of the store;{client_id}– the Client ID of the app;{scopes}– the scopes of the app, separated by commas;{redirect_uri}– one of the Redirect URLs of the app version;{nonce}– a random value that you check when Shopify redirects back.
Do not add grant_options[]=per-user to this URL: it gives an online token, which expires after 24 hours or when the user logs out of the Shopify admin.
The store owner opens the link and approves the access, and Shopify redirects to {redirect_uri} with the code parameter. Exchange the code for a token:
curl --location 'https://{store_url}/admin/oauth/access_token' \
--header 'Content-Type: application/json' \
--data '{
"code": "{code}",
"client_id": "{client_id}",
"client_secret": "{client_secret}"
}'
Do not add "expiring": 1 to this request. Without it, Shopify returns an offline token without an expiration date: it works until the app is uninstalled from the store or its secret is revoked. With it, the token expires in one hour and comes with a refresh token, and API2Cart does not renew such tokens.
Connect the Shopify store to API2Cart with shopify_access_token set to the access_token from the response. Add shopify_shared_secret, the Secret of the app, if you use webhooks or Live Shipping Rates. Do not pass shopify_client_id for such a store: the client credentials grant does not work for it, so the parameter only hides token errors behind Can't receive access token….
Connect Shopify with an app created in the store admin
An app created in the Shopify admin before January 1, 2026 keeps working. Pass its Admin API access token as shopify_access_token. If you use webhooks or Live Shipping Rates, pass the API secret key of the app as shopify_shared_secret. Do not pass shopify_client_id: such a token does not expire and needs no renewal.
Warning about expiring offline access tokens
For a store connected without shopify_client_id, API2Cart adds a warning to return_message of the method responses. It starts with Warning: Shopify requires public apps to migrate to expiring offline access tokens by January 1, 2027.
This Shopify requirement applies only to apps with public distribution. It does not apply to apps with custom distribution or to apps created in the store admin, so for the stores connected as described above you can ignore the warning.
Orders older than 60 days
By default, Shopify restricts access to orders older than 60 days. To retrieve older orders, your app must request the read_all_orders access scope and receive approval from Shopify. See the Shopify orders permissions documentation for details.
Shopify app scopes for API2Cart methods
The table lists the scopes each API2Cart method needs. A scope marked optional is needed only for the parameter or data named next to it. A write scope, such as write_products, also grants the matching read access.
Methods missing from the table need no scopes. order.status.list, order.financial_status.list, order.fulfillment_status.list, return.status.list and return.reason.list return fixed lists of values and do not send requests to Shopify. webhook.list, webhook.count, webhook.delete and webhook.events work with the webhooks created through API2Cart.
| Method | Scopes |
|---|---|
| analytics.report | read_reports. Shopify also requires Level 2 access to protected customer data |
| analytics.product_report | read_reports. Shopify also requires Level 2 access to protected customer data |
| analytics.customer_report | read_reports. Shopify also requires Level 2 access to protected customer data |
| basket.live_shipping_service.list | read_shipping |
| basket.live_shipping_service.create | write_shipping |
| basket.live_shipping_service.delete | write_shipping |
| cart.info | read_products, read_locations,
read_shipping, read_locales,
read_publications (optional, for the sales channels in stores_info) |
| cart.catalog_price_rules.count | read_products, read_discounts |
| cart.catalog_price_rules.list | read_products, read_discounts |
| cart.coupon.list | read_products, read_discounts,
read_customers (optional, for coupons limited to customers or customer segments) |
| cart.coupon.add | read_products, write_discounts |
| cart.coupon.delete | read_products, write_discounts |
| cart.coupon.condition.add | read_products, write_discounts,
read_customers (optional, for conditions on customers) |
| cart.giftcard.count | read_gift_cards |
| cart.giftcard.list | read_gift_cards,
read_customers (optional, for the customer of a gift card) |
| cart.giftcard.add | read_customers, write_gift_cards,
write_customers (optional, for recipient_email) |
| cart.giftcard.delete | write_gift_cards |
| cart.meta_data.list | read_products, read_customers,
read_orders or read_marketplace_orders,
read_locales,
read_translations (optional, for lang_id other than the default language) |
| cart.meta_data.set | read_locales, write_products,
write_orders, write_customers,
write_translations (optional, for lang_id other than the default language) |
| cart.meta_data.unset | write_products, write_orders,
write_customers |
| cart.script.list | read_script_tags |
| cart.script.add | write_script_tags |
| cart.script.delete | write_script_tags |
| cart.shipping_zones.list | read_shipping |
| category.info | read_products, read_locales,
read_translations (optional, for lang_id other than the default language) |
| category.count | read_products |
| category.list | read_products, read_locales,
read_translations (optional, for lang_id other than the default language) |
| category.find | read_products |
| category.assign | write_products |
| category.unassign | write_products |
| category.add | write_products, write_publications |
| category.add.batch | write_products, write_publications |
| category.update | read_locales, write_products,
write_publications,
write_translations (optional, for lang_id other than the default language) |
| category.delete | write_products |
| category.image.add | write_products, write_files |
| category.image.delete | write_products |
| customer.info | read_customers, read_orders or
read_marketplace_orders |
| customer.count | read_customers |
| customer.list | read_customers, read_orders or
read_marketplace_orders |
| customer.find | read_customers |
| customer.add | write_customers |
| customer.update | write_customers |
| customer.delete | write_customers |
| customer.address.add | write_customers |
| order.info | read_orders or read_marketplace_orders,
read_customers, read_locations,
read_shipping, read_fulfillments,
read_products, read_locales,
any one of read_merchant_managed_fulfillment_orders,
write_merchant_managed_fulfillment_orders,
read_third_party_fulfillment_orders,
write_third_party_fulfillment_orders,
read_assigned_fulfillment_orders or
write_assigned_fulfillment_orders (optional, for warehouse_id and fulfillment_holds in additional_fields of order items),
read_companies (optional, for b2b_company in additional_fields) |
| order.count | read_orders or read_marketplace_orders,
read_customers |
| order.list | read_orders or read_marketplace_orders,
read_customers, read_locations,
read_shipping, read_fulfillments,
read_products, read_locales,
any one of read_merchant_managed_fulfillment_orders,
write_merchant_managed_fulfillment_orders,
read_third_party_fulfillment_orders,
write_third_party_fulfillment_orders,
read_assigned_fulfillment_orders or
write_assigned_fulfillment_orders (optional, for warehouse_id and fulfillment_holds in additional_fields of order items),
read_companies (optional, for b2b_company in additional_fields) |
| order.find | read_orders or read_marketplace_orders,
read_customers, read_locations,
read_shipping, read_fulfillments,
read_products,
any one of read_merchant_managed_fulfillment_orders,
write_merchant_managed_fulfillment_orders,
read_third_party_fulfillment_orders,
write_third_party_fulfillment_orders,
read_assigned_fulfillment_orders or
write_assigned_fulfillment_orders (optional, for warehouse_id and fulfillment_holds in additional_fields of order items),
read_companies (optional, for b2b_company in additional_fields) |
| order.add | write_orders, write_customers,
read_products, read_locales,
read_inventory (optional, for inventory_behaviour = decrement_obeying_policy) |
| order.update | write_orders |
| order.calculate | write_draft_orders, read_products |
| order.abandoned.list | read_orders or read_marketplace_orders,
read_customers, read_products |
| order.refund.add | write_orders, read_products,
read_locations (optional, for item_restock) |
| order.return.add | write_orders, write_returns |
| order.return.update | write_returns |
| order.shipment.info | read_orders or read_marketplace_orders,
read_customers, read_locations,
read_fulfillments, read_products |
| order.shipment.list | read_orders or read_marketplace_orders,
read_customers, read_locations,
read_fulfillments, read_products |
| order.shipment.add | read_orders,
read_customers, read_locations,
read_inventory, write_fulfillments,
read_products,
read_merchant_managed_fulfillment_orders,
write_merchant_managed_fulfillment_orders,
read_third_party_fulfillment_orders,
write_third_party_fulfillment_orders,
read_assigned_fulfillment_orders,
write_assigned_fulfillment_orders |
| order.shipment.add.batch | read_orders,
read_customers, read_locations,
read_inventory, write_fulfillments,
read_products,
read_merchant_managed_fulfillment_orders,
write_merchant_managed_fulfillment_orders,
read_third_party_fulfillment_orders,
write_third_party_fulfillment_orders,
read_assigned_fulfillment_orders,
write_assigned_fulfillment_orders |
| order.shipment.update | read_orders,
read_inventory, write_fulfillments,
read_products,
read_merchant_managed_fulfillment_orders,
write_merchant_managed_fulfillment_orders,
read_third_party_fulfillment_orders,
write_third_party_fulfillment_orders,
read_assigned_fulfillment_orders,
write_assigned_fulfillment_orders |
| order.shipment.delete | read_orders,
read_inventory, write_fulfillments,
read_products,
read_merchant_managed_fulfillment_orders,
write_merchant_managed_fulfillment_orders,
read_third_party_fulfillment_orders,
write_third_party_fulfillment_orders,
read_assigned_fulfillment_orders,
write_assigned_fulfillment_orders |
| order.shipment.tracking.add | read_orders,
read_inventory, write_fulfillments,
read_products,
read_merchant_managed_fulfillment_orders,
write_merchant_managed_fulfillment_orders,
read_third_party_fulfillment_orders,
write_third_party_fulfillment_orders,
read_assigned_fulfillment_orders,
write_assigned_fulfillment_orders |
| order.shipment.event.list | read_orders |
| order.shipment.event.add | read_orders, write_fulfillments |
| order.transaction.list | read_orders or read_marketplace_orders |
| product.info | read_products, read_inventory,
read_locations,
read_publications (optional, for the sales channels: store_id, stores_ids),
read_locales and read_translations (optional, for lang_id) |
| product.count | read_products,
read_publications (optional, for store_id and avail_view) |
| product.list | read_products, read_inventory,
read_locations,
read_publications (optional, for the sales channels: store_id, stores_ids, avail_view),
read_locales and read_translations (optional, for lang_id) |
| product.find | read_products |
| product.fields | read_products |
| product.add | write_products, read_locations,
write_inventory,
write_publications (optional, to publish the product and for stores_ids) |
| product.add.batch | write_products, read_locations,
write_inventory,
write_publications (optional, to publish the products and for stores_ids) |
| product.update | write_products, read_locations,
write_inventory,
write_publications (optional, to publish the product and for stores_ids),
read_locales and write_translations (optional, for lang_id other than the default language) |
| product.update.batch | write_products, read_locations,
write_inventory,
write_publications (optional, to publish the products and for stores_ids) |
| product.delete | write_products |
| product.delete.batch | write_products |
| product.attribute.list | read_products |
| product.attribute.value.set | write_products |
| product.attribute.value.unset | write_products |
| product.child_item.info | read_products, read_inventory,
read_locations |
| product.child_item.list | read_products, read_inventory,
read_locations |
| product.child_item.find | read_products, read_inventory,
read_locations |
| product.image.add | write_products,
write_files (optional, for content) |
| product.image.delete | write_products |
| product.option.add | write_products |
| product.variant.count | read_products |
| product.variant.add | write_products, read_locations,
write_inventory |
| product.variant.add.batch | write_products, read_locations,
write_inventory |
| product.variant.update | write_products, read_locations,
write_inventory |
| product.variant.update.batch | write_products, read_locations,
write_inventory |
| product.variant.delete | write_products |
| product.variant.delete.batch | write_products |
| product.variant.image.delete | write_products |
| return.info | read_orders, read_returns,
read_customers |
| return.list | read_orders, read_returns,
read_customers |
| subscriber.list | read_customers |
| tax.class.info | read_products |
| webhook.create | Depending on the entity:
product – read_products, read_inventory (not needed when fields contains neither additional_fields nor cost_price);
category – read_products;
order – read_orders;
basket – read_orders, read_products;
order.shipment – read_orders, read_fulfillments;
customer – read_customers;
subscriber – read_customers |
| webhook.update | The same as for webhook.create when the webhook is activated |