Connect to a project
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
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
| Caller | Header |
|---|---|
| Server integration with an Admin API key | X-Api-Key: <admin-api-key> |
| Signed-in Admin user | Authorization: Bearer <admin-access-token> |
| Protected Storefront project | X-Thor-Storefront-Token: <storefront-token> |
| Signed-in customer | Authorization: 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:
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.
| Symptom | Check first |
|---|---|
| Non-JSON response | Host, route, proxy, and project slug |
| Authentication failure | Header type, credential value, and environment |
| Permission failure | Whether the credential allows the requested operation |
| Successful empty catalog | Store setup and publication rather than authentication |
Continue with the Admin quickstart or Storefront quickstart.