Docs
Dashboard

Connect to a project

Last updated View as Markdown

Connect to a project

Keep your project slug, endpoint, and credentials together in server-side configuration. A store ID is not the project slug: stores are resources inside a project.

Choose the endpoint

Project endpoints
Code in text

Replace {project} with your project’s slug. Use the Admin endpoint for management work and the Storefront endpoint for buying experiences. The unscoped schema endpoints are for schema discovery, not project commerce data.

Choose the credential

CallerHeader
Server integration with an Admin API keyX-Api-Key: <admin-api-key>
Signed-in Admin userAuthorization: Bearer <admin-access-token>
Protected Storefront projectX-Thor-Storefront-Token: <storefront-token>
Signed-in customerAuthorization: Bearer <customer-access-token> in addition to required Storefront access

Do not put an Admin API key in a bearer header. A customer token grants customer identity, not Admin access. See Authentication and project routing for the boundaries.

Verify a read

Configure THOR_PROJECT and THOR_ADMIN_API_KEY in your local shell or secret environment, then run:

Connection check
Code in bash

Inspect both the HTTP result and the JSON body. data.stores.nodes with an empty list can still be a successful connection to an unconfigured project. A top-level errors array requires inspection even with HTTP 200.

SymptomCheck first
Non-JSON responseHost, route, proxy, and project slug
Authentication failureHeader type, credential value, and environment
Permission failureWhether the credential allows the requested operation
Successful empty catalogStore setup and publication rather than authentication

Continue with the Admin quickstart or Storefront quickstart.