RAILWAY_API_TOKEN not being respected.
erlloyd
FREEOP

19 days ago

Hi - I'm trying to get some very basic railway cli commands to work in my github actions, and it is not working at all. I can also reporduce this locally. Just running the following command:

RAILWAY_API_TOKEN= railway whoami gives an Unathorized error.

Any suggestions?

$10 Bounty

9 Replies

Try using the CLI token in Railway CLI's config.json.

It should be located in your home directory under a folder named .railway


brody, sam…
it works 😭 i js tested it myself


brody
EMPLOYEE

18 days ago

Absolutely not recommended. Please use the correctly scoped API key and the applicable variable key.


My bad…
I guess try recreating an account token (make sure its not team token) and try again i guess


erlloyd
FREEOP

15 days ago

I've recreated the token multiple times and I still see the same behavior.


erlloyd
FREEOP

15 days ago

Can we confirm if this is a bug / unexpected behavior?


brody
EMPLOYEE

15 days ago

You would want to use an account scoped token


erlloyd
FREEOP

15 days ago

That's what I'm using


erlloyd
FREEOP

15 days ago

I worked around this for now by writing my own script hitting the GraphQL API, but I'm using the exact same account-scoped token, so I know the token provides access to what I'm trying to do.


Loading...