Skip to main content

Restrict API access with an IP allowlist

An IP allowlist limits where your app's access tokens can be used. When enforcement is on, Shopify checks the source IP address of every GraphQL Admin API and REST Admin API request that uses your app's tokens. You can allow specific IP addresses and ranges, the networks your app runs on by their autonomous system number (ASN), or both. Requests from outside your allowlist fail with a 403 status code, and so do requests whose source address Shopify can't confirm. A stolen token can't make GraphQL or REST Admin API requests from anywhere but the places you allow.


Anchor to Requirement for public appsRequirement for public apps

IP allowlists are required for all public apps:

  • November 12, 2026: Shopify blocks bulk queries and bulk mutations from public apps that don't have an IP allowlist.
  • November 20, 2026: Public apps without an IP allowlist are delisted from the Shopify App Store and blocked from new installs. They're also flagged to merchants in Settings > Apps. Existing installs keep working.
  • January 15, 2027: Merchants using the app see a warning in the Shopify admin.
  • April 1, 2027: Shopify rejects the app's GraphQL Admin API and REST Admin API requests.

Anchor to Requirement for custom appsRequirement for custom apps

IP allowlists are required for custom apps that you install on stores outside your organization. To install an app on a store outside your organization:

  • November 20, 2026: The app must have an IP allowlist.
  • January 1, 2027: The app must have an IP allowlist, and so must every app that you've already installed on stores outside your organization.

We also highly recommend IP allowlists for apps installed only on stores in your own organization, though they aren't required.


An IP allowlist works with both static and dynamic outbound IP addresses:

  • If your app's addresses are static, then allow them as IP addresses. This is the narrowest allowlist, because only your own servers can use your tokens.
  • If they're dynamic, as on most serverless platforms, then allow your hosting provider's autonomous system numbers (ASNs).
  • If some of your app's requests come from static addresses and others from dynamic ones, then allow addresses and ASNs in one allowlist. For example, allow your hosting provider's ASN for your app's servers, and the single IP address of a third-party tool that makes requests with your app's tokens.

An IP allowlist doesn't work with the following:

  • Access tokens used by the Shopify Flow Send HTTP request action. Shopify can't confirm the source IP address of these requests, so it rejects them.
  • Access tokens used to make GraphQL Admin API requests from a storefront hosted on Oxygen, for the same reason.

These kinds of requests are never rejected:


IP allowlists are written as CIDR ranges. A CIDR range is an IP address followed by a prefix length. For example, 203.0.113.0/24 covers 203.0.113.0 to 203.0.113.255. A higher prefix length means a smaller range, and an entry without one is a single address. To convert an address range to CIDR ranges, use ARIN's CIDR Calculator.

Your allowed IP addresses must follow these rules:

  • Enter up to 250 addresses or ranges, one per line.
  • Use /16 or narrower for IPv4, and /32 or narrower for IPv6.
  • Use public addresses only. If your servers are behind a NAT gateway, then use the gateway's addresses.
  • Start each range at its network address, such as 203.0.113.0/24, not 203.0.113.7/24.
  • If your servers reach Shopify over IPv6, then include their IPv6 addresses.

Caution

A provider's network is shared with its other customers. Anyone who runs servers in an ASN that you allow, and who has a stolen token, can use it from there. Allowlist only IP addresses when you can, and if you allowlist ASNs, then list only the countries your app runs in.

An ASN identifies an autonomous system: a network that one organization runs, such as a hosting provider or an ISP.

If your allowlist also has IP addresses, then Shopify checks them first. A request from an address in one of your ranges is allowed without an ASN lookup.

For every other request, Shopify looks up the ASN and country of the source IP address in MaxMind's GeoLite data. A request is allowed when its ASN is on your list and, if you list countries, its country is on your list too. The country is where the data places the address, not where the network's owner is registered. If the data has no ASN for an address outside your ranges, or no country when you list countries, then Shopify rejects the request.

Your allowed ASNs must follow these rules:

  • Enter up to 10 ASNs, one per line, as a number with or without an AS prefix.
  • Use public ASNs only. Private, reserved, and documentation ASNs can't be allowed.
  • Choose up to 10 countries to narrow the ASNs. Countries are recommended: without them, an ASN is allowed from anywhere.
  • Countries narrow only your ASNs, not your IP addresses. You can't choose countries without ASNs.

A provider can run more than one ASN, and can add more over time. To find the ASNs that your app's requests come from, check your hosting provider's documentation, or find the client IP addresses of your app's requests in its Logs in the Dev Dashboard and check which ASNs they belong to. Test your allowlist against recent traffic before you turn on enforcement.


Anchor to Set up an IP allowlistSet up an IP allowlist

  1. Open your app in the Dev Dashboard, click Settings, and then click Manage in the IP allowlist section.
  2. Enter the IP addresses, the ASNs, or both that you want to allow:
    • In IP addresses or CIDR ranges, enter your addresses and ranges.
    • In Networks (ASN), enter your ASNs.
    • Under Limit ASNs to countries, choose the countries your app runs in. Countries narrow only your ASNs, and they're recommended when you enter ASNs.
  3. Under Test against recent traffic, click Run test.
    • Check whether any of your own addresses from the last 30 days would be blocked. If they would, then adjust the allowlist and test again.
    • Results can take a few minutes to include your most recent requests.
  4. Turn on Enforce IP allowlist, and click Save.
  5. Make a GraphQL Admin API request from outside your allowlist, and confirm that it fails with a 403 status code.

To stop enforcing the allowlist, turn off Enforce IP allowlist and click Save. Shopify keeps your allowlist, so you can turn enforcement back on later.



Was this page helpful?