# 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 ```text https://api.thorcommerce.io/{project}/admin/graphql https://api.thorcommerce.io/{project}/storefront/graphql ``` 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: ` | | Signed-in Admin user | `Authorization: Bearer ` | | Protected Storefront project | `X-Thor-Storefront-Token: ` | | Signed-in customer | `Authorization: Bearer ` 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](/concepts/api/authentication) 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 ```bash curl --fail-with-body "https://api.thorcommerce.io/${THOR_PROJECT}/admin/graphql" -H "X-Api-Key: ${THOR_ADMIN_API_KEY}" -H 'Content-Type: application/json' --data '{"query":"query ConnectionCheck { stores(first: 1) { nodes { id name } } }"}' ``` 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](/getting-started/admin-quickstart) or [Storefront quickstart](/getting-started/storefront-quickstart).