unable to access railway public apis
chalumurigirish
HOBBYOP

8 months ago

curl --request POST \

--url https://backboard.railway.com/graphql/v2 \

--header 'Authorization: Bearer <API_TOKEN>' \

--header 'Content-Type: application/json' \

--data '{"query":"query { me { name email } }"}'

upon executing the above curl with API_TOKEN generated from railway personal token at account level below is the error that is being thrown , anywhere i might be going wrong.

{"errors":[{"message":"Not Authorized","locations":[{"line":1,"column":9}],"path":["me"],"extensions":{"code":"INTERNAL_SERVER_ERROR"},"traceId":"3467315049947129990"}],"data":null}

$10 Bounty

8 Replies

Railway
BOT

8 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!


Railway

Hey there! We've found the following might help you get unblocked faster: - [🧵 API Token "Not Authorized" Error for Public API and MCP Automation](https://station.railway.com/questions/api-token-not-authorized-error-for-pub-82b4ccf1) - [🧵 redis error not authorized](https://station.railway.com/questions/redis-error-not-authorized-d8e1f80b) - [🧵 GraphQL API Authentication Error](https://station.railway.com/questions/graph-ql-api-authentication-error-2a79ebf4) - [🧵 Error while visiting my API](https://station.railway.com/questions/error-while-visiting-my-api-d20e3b07) If you find the answer from one of these, please let us know by solving the thread!

chalumurigirish
HOBBYOP

8 months ago

I have used account token , but still facing the same issue


turborx
FREE

8 months ago

hi, you need to use a personal api token, not a team token. send it in the header as authorization: bearer <your_token>team tokens can’t access queries like me or teams. generate a personal token from your railway account settings.


sanyasharma7
FREE

8 months ago

You're getting that error because Railway personal API tokens don’t work with the GraphQL endpoint — only internal/plugin tokens do.

Try this: Use the REST API instead. Example:

curl -H "Authorization: Bearer <API_TOKEN>" \
https://backboard.railway.app/project

durga-parkhe
FREE

7 months ago

Railway provide below public domain api.
When I am trying to access but giving error: This site can’t be reached
Domain URL: https://fa-production-07ec.up.railway.app/farmer-api/api/health


durga-parkhe

Railway provide below public domain api.When I am trying to access but giving error: This site can’t be reachedDomain URL: https://fa-production-07ec.up.railway.app/farmer-api/api/health

turborx
FREE

7 months ago

hi, i am happy to help, but this looks like a separate issue from the original bounty. please open your own post with the full details so it gets proper attention.


turborx

hi, i am happy to help, but this looks like a separate issue from the original bounty. please open your own post with the full details so it gets proper attention.

durga-parkhe
FREE

7 months ago

Issue is resolved


turborx
FREE

7 months ago

can you mark this issue as solved if it helped you?


Loading...