RAILWAY_API_TOKEN getting Unauthorized. Please login with `railway login`
According to your docs, I can take an API token created in my account tokens page and prefix the railway whoami command like so:
RAILWAY_API_TOKEN=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX railway whoami
But when I do this, all I get is:
Unauthorized. Please login with `railway login`
Any ideas?
Hello,
That would only be possible if that token is an account level token, if you choose a team while creating that token then whoami won't work as a team token does not have the needed scope to read the user data.
i have the same issue, and i saw that was reported about 2 years ago
Likely unrelated, we had a API level bug that messed with CLI sessions, considering those resolved for now.