Skip to main content

Shopify Admin API Proxy

The Admin API Proxy lets you execute Shopify Admin GraphQL queries through Weaverse without managing Shopify credentials directly. Weaverse authenticates your request with a Content API token, then forwards the query to the correct Shopify store using the app’s existing OAuth credentials.

Overview

Use the Admin API Proxy when you need Shopify Admin data outside of a Hydrogen storefront:
  • Third-party CMS — pull product data, metaobjects, or theme info into a headless CMS
  • Mobile apps — query Shopify without embedding Admin API credentials in a client app
  • Custom frontends — access store data from Next.js, Astro, or any framework
  • Internal tools — build dashboards or automation that reads Shopify data
This is a passthrough proxy — your GraphQL query is forwarded to Shopify’s Admin API as-is. Weaverse does not transform the query or cache the response.

Authentication

The proxy uses the same Content API tokens as the Content API. Pass your token in the Authorization header:
Authorization: Bearer YOUR_API_KEY
Create and manage tokens from Dashboard → Settings in the Weaverse Studio.

Endpoint

POST https://studio.weaverse.io/api/admin-graphql

Request Format

Send a JSON body with a query field and an optional variables field:
curl -X POST https://studio.weaverse.io/api/admin-graphql \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "{ shop { name } }",
    "variables": {}
  }'

Request Body

FieldTypeRequiredDescription
querystringYesA Shopify Admin GraphQL query or mutation
variablesobjectNoVariables referenced in the query

Rate Limits

The proxy enforces 1,000 requests per hour per token. Rate limit headers are included on every response:
HeaderDescription
X-RateLimit-LimitMaximum requests per window (1000)
X-RateLimit-RemainingRequests remaining in the current window
X-RateLimit-ResetUnix timestamp when the window resets
Retry-AfterSeconds to wait (only on 429 responses)
When you receive a 429 Too Many Requests response, back off for the duration specified in the Retry-After header. Repeated violations may result in temporary token suspension.

Scopes

Admin API Proxy scopes control which Shopify resources your token can access. Manage scopes from Dashboard → Settings alongside your API keys.

Required Scopes

These scopes are granted by default when you enable the Admin API Proxy:
ScopeDescription
read_contentRead Shopify content (articles, blogs, pages)
read_filesRead uploaded files
write_filesUpload and manage files
read_metaobject_definitionsRead metaobject definitions and entries
read_productsRead products, variants, and collections
read_themesRead theme data
write_themesModify theme assets

Optional Scopes

Request additional scopes if your integration needs them:
ScopeDescription
read_ordersRead order data
read_customersRead customer data
read_inventoryRead inventory levels
read_shippingRead shipping and fulfillment data
Only request scopes your integration actually needs. Additional scopes require approval and may affect your app’s permissions review.

Examples

Query Shop Name

curl -X POST https://studio.weaverse.io/api/admin-graphql \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "{ shop { name primaryDomain { url } } }"
  }'
Response:
{
  "data": {
    "shop": {
      "name": "My Store",
      "primaryDomain": {
        "url": "https://my-store.myshopify.com"
      }
    }
  }
}

Query Products

curl -X POST https://studio.weaverse.io/api/admin-graphql \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "query GetProducts($first: Int!) { products(first: $first) { edges { node { id title handle status } } } }",
    "variables": { "first": 5 }
  }'
Response:
{
  "data": {
    "products": {
      "edges": [
        {
          "node": {
            "id": "gid://shopify/Product/123456789",
            "title": "Classic T-Shirt",
            "handle": "classic-t-shirt",
            "status": "ACTIVE"
          }
        }
      ]
    }
  }
}

Error Response

{
  "error": "Unauthorized",
  "message": "Invalid or expired API token",
  "status": 401
}

Error Handling

StatusCauseAction
401 UnauthorizedInvalid, expired, or missing tokenCheck your API key and regenerate if needed
403 ForbiddenToken lacks required scopeAdd the necessary scope in Dashboard → Settings
429 Too Many RequestsRate limit exceededBack off using the Retry-After header value
500 Internal Server ErrorShopify returned an error or is unavailableRetry with exponential backoff; check Shopify Status
504 Gateway TimeoutQuery exceeded the 15-second timeoutSimplify your query or reduce the requested data
All proxied requests have a 15-second timeout. Complex queries requesting large datasets may need to be paginated or simplified.

Security Best Practices

Never expose API tokens in client-side code. Browser source, network tabs, and bundled JavaScript are all visible to end users. Always call the proxy from a server or serverless function.
  • Rotate tokens regularly — regenerate tokens periodically and after any suspected compromise
  • Minimize scopes — only request the scopes your integration needs (principle of least privilege)
  • Use one token per integration — if one integration is compromised, revoke its token without affecting others
  • Monitor usage — check lastAccess timestamps in Dashboard → Settings to detect stale or unauthorized tokens
  • Secure your server — ensure the backend making proxy calls is itself authenticated and access-controlled