HTTP 403 verifying a project-scoped API token
cmacelis
HOBBYOP

10 hours ago

I’m using a project-scoped token on the Hobby plan. A read-only GraphQL request using the Project-Access-Token header returns HTTP 403. The query uses projectToken, service, and serviceInstance. This happened October 13 around 11:16 UTC. Are all three queries supported for project tokens, and what should I check to distinguish token permissions from an API or account restriction?

$10 Bounty

1 Replies

Status changed to Awaiting Railway Response Railway • about 10 hours ago


Railway
BOT

9 hours ago

This thread has been opened as a bounty so the community can help solve it.

Status changed to Open Railway • about 9 hours ago


duetmain
FREE

4 hours ago

I'd split this into three requests before changing the token's permissions.

Railway explicitly documents projectToken for project tokens. Send a POST to https://backboard.railway.com/graphql/v2 with Content-Type: application/json and your existing Project-Access-Token header, using only this body:

{"query":"query { projectToken { projectId environmentId } }"}

Don't include an Authorization: Bearer header for this test. A project token is scoped to one environment, not every environment in the project.

If that succeeds, check the returned IDs privately, then try service and serviceInstance separately with minimal fields. For serviceInstance, use that exact environmentId and a service belonging to that project. Both queries are documented, but the examples aren't a guarantee that every selected field is accessible to every token type. Separating them tells us which operation or field fails.

One useful distinction: Railway documents resolver authorization failures as HTTP 200 with a GraphQL errors array. An actual HTTP 403 alone doesn't establish that service or serviceInstance is unsupported. If the minimal projectToken request also returns 403, capture the Content-Type and inspect the body privately: is it GraphQL JSON or an HTML/text rejection? For JSON, retain the error's message, extensions.code and extensions.traceId; give Railway support the trace ID and your October 13 11:16 UTC timestamp. Don't post tokens, request headers or an unreviewed response dump.

Docs: https://docs.railway.com/integrations/api

Service queries: https://docs.railway.com/integrations/api/manage-services

AI-assisted; I checked these against Railway's current docs. I haven't accessed your account or reproduced your 403. Does projectToken by itself fail too?


Welcome!

Sign in to your Railway account to join the conversation.

Loading...