2 months ago
This is failing with NOT AUTHORIZED:
curl -s -X POST https://backboard.railway.app/graphql/v2 \
-H "Authorization: Bearer YOUR_TOKEN_HERE" \
-H "Content-Type: application/json" \
-d '{"query": "query { me { projects { edges { node { id name services { edges { node { id name } } } } } } } }"}'
even though I am using a user-scoped token I created here:
https://railway.com/account/tokens
For what it's worth I'm still a trial account. Does that matter?
Pinned Solution
2 months ago
the issue is your query path doesn't exist. you can't do me { projects { ... }}. you need to query through workspace instead:
bash
curl -s -X POST https://backboard.railway.app/graphql/v2 \
-H "Authorization: Bearer YOUR_TOKEN_HERE" \
-H "Content-Type: application/json" \
-d '{"query": "query { workspace(workspaceId: \"YOUR_WORKSPACE_ID\") { projects { edges { node { id name services { edges { node { id name } } } } } } } }"}'get your workspace id by hitting cmd/ctrl + k in the dashboard and searching "copy active workspace id"
trial accounts have full api access so that's not the problem
3 Replies
2 months ago
Hey there! We've found the following might help you get unblocked faster:
If you find the answer from one of these, please let us know by solving the thread!
2 months ago
the issue is your query path doesn't exist. you can't do me { projects { ... }}. you need to query through workspace instead:
bash
curl -s -X POST https://backboard.railway.app/graphql/v2 \
-H "Authorization: Bearer YOUR_TOKEN_HERE" \
-H "Content-Type: application/json" \
-d '{"query": "query { workspace(workspaceId: \"YOUR_WORKSPACE_ID\") { projects { edges { node { id name services { edges { node { id name } } } } } } } }"}'get your workspace id by hitting cmd/ctrl + k in the dashboard and searching "copy active workspace id"
trial accounts have full api access so that's not the problem
Status changed to Solved brody • about 2 months ago
