Skip to content
BlokloDocumentation

Shopify

Products, collections, orders and customers of a Shopify store, for example a product list on a company site, an order status or a payment link for a prepared order.

Connection type: For the app and the agent. Credentials: Store name (before .myshopify.com).

How it works

The app and the agent never see the credentials. They call the Shopify API through the Bloklo gateway, for example fetch("/gw/<connection id>/graphql.json"). The gateway appends the path to the address https://{shop}.myshopify.com/admin/api/2026-10 (the fields in braces come from the connection form), adds an OAuth token fetched automatically with the connection's app credentials (client_id and client_secret) and renewed before it expires, and passes the service's response back to the app.

  • Reads (GET) go through at once. Writes (POST, PUT, PATCH, DELETE) go through at once only when the connection is set to Always allow; otherwise the gateway returns status 202 with an approval_id and the write waits for approval in the panel (see Agent permissions).
  • The Test button sends POST /graphql.json and checks that the service accepted the credentials.

Admin GraphQL API: every call is a POST to /graphql.json with a {query, variables} body; the version (2026-10) is in the URL and the token goes in the X-Shopify-Access-Token header. Responses return HTTP 200 even for logical errors, so check errors and userErrors. Cursor pagination (first, after, pageInfo.endCursor), IDs look like gid://shopify/….

Before you start

  • An account with Shopify with permission to create API keys or tokens.

Where to get the credentials

  1. In the Shopify admin, open Settings → Apps and sales channels → Develop apps and choose Build apps in Dev Dashboard.
  2. In the Dev Dashboard, click Create app → Start from Dev Dashboard and enter a name, for example “Bloklo”.
  3. Create an app version: select the scopes read_products, read_orders, read_customers and, if Bloklo should prepare orders, write_draft_orders. Leave the redirect URLs empty and click Release.
  4. On the Installs card choose Install app, pick your store and confirm.
  5. In the app's Settings, copy the Client ID and Client secret into the Bloklo form. The store name is the part of the address before .myshopify.com.
  6. A store with a legacy custom app (created in the admin before 2026) can enter its shpat_… token instead.
Note

The app must belong to the same Shopify organisation as the store. Orders older than 60 days need the extra read_all_orders scope. Bloklo renews access by itself every 24 hours.

Shopify documentation

Connecting in Bloklo

  1. Open Connectors in the sidebar and find Shopify.
  2. Click Connect and enter a connection name in Details.
  3. In Configure connection, fill in: Store name (before .myshopify.com), App Client ID, App Client secret, Admin API token (legacy custom apps only).
  4. Click Connect. Bloklo saves the credentials encrypted and sends a test request; the message shows whether the service responded.
  5. Attach the connection to a project: Attach to a project… on the connection page, or describe the task in the project chat and pick the connection the agent suggests.

Form fields

  • Store name (before .myshopify.com): Just the name from my-store.myshopify.com, without https:// and not the custom domain.
  • App Client ID (optional): From the app settings in the Shopify Dev Dashboard.
  • App Client secret (optional)
  • Admin API token (legacy custom apps only) (optional): A shpat_… token from an app created in the store admin before 2026. Used instead of the Client ID and Client secret.
Important

Never paste credentials into the chat with the agent. Enter them only in the connection form.

Example prompts

Prompts to type in the chat of a project with the connection attached:

  • “Add a store page that shows Shopify products with a checkout button.”
  • “Build a dashboard with the latest orders and their fulfillment status.”
  • “Add an inquiry form that creates a draft order with a payment link.”

API methods

The most commonly used Shopify API methods. The path goes after /gw/<connection id>; parts in braces, such as {id}, are replaced with values. The gateway treats every request other than GET as a write, including queries sent with POST (such as search or GraphQL), so they need approval unless the connection is set to Always allow. The full list of methods is in the provider's documentation.

MethodPathWhat it doesIn the gateway
POST/graphql.jsonQuery shop name, currency and domainwrite (approval)
POST/graphql.jsonQuery products with variants and priceswrite (approval)
POST/graphql.jsonQuery collectionswrite (approval)
POST/graphql.jsonQuery orders with statuseswrite (approval)
POST/graphql.jsonQuery customerswrite (approval)
POST/graphql.jsonQuery inventory levelswrite (approval)
POST/graphql.jsonCreate a product (productCreate)write (approval)
POST/graphql.jsonCreate a draft order with a payment link (draftOrderCreate)write (approval)
POST/graphql.jsonCreate a customer (customerCreate)write (approval)

Service limits

Limits are based on query cost (leaky bucket): 100 points per second on the standard plan, 200 on Advanced, 1,000 on Plus, 2,000 on enterprise. A single query cannot cost more than 1,000 points. Input arrays are capped at 250 items, list pages at 250 objects, and a pagination run at 25,000 objects in total; use bulk operations for larger sets. Recommended backoff after throttling: 1 second. Versions are supported for at least 12 months.

Shopify API reference

Agent actions and permissions

ActionTypeWhat the agent uses it for
Read datareadFetches data from the service, such as a list of records, to build and check the app.
Write datawriteRequests other than GET: creating, changing or deleting data in the service, and also queries sent with POST (such as search). Examples: query shop name, currency and domain; query products with variants and prices; query collections.
Tip

By default, reads run without asking and writes need approval in the chat. Change this on the connector page or in Settings → Agent permissions (see Agent permissions).

Troubleshooting

The connection test shows “Invalid key” (HTTP 401)

The service did not recognise the credentials: the value is wrong, expired, revoked or was copied with a space. Create a new key at the provider and enter it on the connection page under Change credentials. Empty fields stay unchanged.

The connection test shows “Invalid key” (HTTP 403)

The credentials are rejected or lack the needed permissions, or the service only accepts requests from selected IP addresses. Check the key, extend its permissions at the provider or add the Bloklo gateway IP address (shown in Settings → Privacy & security) to the allowlist.

The test returns another HTTP code

The Test button sends the service a read request that requires valid credentials. A code other than 401 and 403 usually means a temporary problem at the service or a restriction on the account at the provider; include the error code shown with the result in a problem report.

Limits and security

  • One connection can make up to 1,000 requests per minute; the service's own limits also apply.
  • Credentials are encrypted and not shown in the browser after saving; only the names of stored fields are visible.
  • A published app works for every visitor: protect the data the connection gives access to with sign-in in the app.

Something unclear or out of date? Contact us