See all services → Shopify Plus Partner
Dev Dashboard Developer

Lock Admin API Tokens to Your Own Server IPs

Shopify can now reject GraphQL and REST Admin API requests that use your app's tokens from outside an IP allowlist you set in the Dev Dashboard. A stolen token stops working off your own network.

Executive summary

What changed

You enter addresses or CIDR ranges, up to 100 lines, then test them against the last 30 days of your own traffic before enabling enforcement. The rules are specific: /16 or narrower for IPv4, /32 or narrower for IPv6, public addresses only, each range starting at its network address. Servers behind a NAT gateway need the gateway's addresses, and anything reaching Shopify over IPv6 needs those listed too.

Shopify will not read ranges from a provider's published IP list, and the reasoning is worth repeating to your hosting team: those lists are shared. A cloud region's outbound addresses serve every customer in that region, so a stolen token still works for anyone behind the same egress. Route Shopify traffic through a dedicated static address instead and list that.

Three cases do not work today. Serverless platforms with rotating addresses are unsupported. Tokens used by the Flow Send HTTP request action are rejected, as are Admin API calls from an Oxygen-hosted storefront, because Shopify cannot confirm their source. Dev preview requests and Direct API access from embedded pages are never rejected.

Why it matters

Access tokens are bearer credentials: whoever holds one is the app, with every scope the merchant granted, and until now the only real mitigations were rotation and vigilance. An allowlist makes the token useless without network position, the same reasoning behind restricting database access to known subnets.

For enterprise merchants the relevance sits in the integration layer. The systems holding long-lived Admin API tokens are usually the ones syncing orders and inventory with an ERP or OMS, and those run on predictable infrastructure with stable egress. If you are scoping an ERP integration, a dedicated egress address and an allowlist belong in the build, not a later hardening pass.

Role-specific impact

Use-case example

Real-world scenario

A Plus distributor runs order and inventory sync through middleware on two servers behind a single NAT gateway, holding a token with read and write access across products, inventory, orders, and customers. The team enters the gateway address as a /32, runs the 30-day traffic test, and finds a stray call pattern from an undocumented staging host, the sort of discovery that justifies the exercise on its own. They add staging, re-test clean, enforce, then verify from outside and get the expected 403. The token is now useless without a position inside that gateway.

Implementation checklist

  1. Convert your ranges to CIDR notation, /16 or narrower for IPv4 and /32 or narrower for IPv6, each starting at its network address.
  2. In the Dev Dashboard, open the app, then Settings, then Manage in the IP allowlist section, and enter the ranges one per line.
  3. Run the test against recent traffic and resolve anything that would be blocked, allowing a few minutes for recent requests to appear.
  4. Enable enforcement, save, then request from outside the ranges and confirm a 403.

FAQ

Q: Our integration runs on serverless functions. Can we use this?

A: Not yet, though Shopify says support is coming. The workable path today is routing outbound calls through a fixed egress, such as a NAT gateway or a small proxy on static infrastructure.

Q: Does enforcement affect our staff using the Shopify admin?

A: No. It applies to Admin API requests made with that app's access tokens, not staff sessions. Embedded pages using Direct API access are also exempt.

Resources

Restrict API access with an IP allowlist

Need guidance? Talk to Makro.