Skip to content

RAILWAY_API_TOKEN getting Unauthorized. Please login with railway login #618

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
dwilt opened this issue Apr 6, 2025 · 2 comments
Open

Comments

@dwilt
Copy link

dwilt commented Apr 6, 2025

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?

@BusyginArtem
Copy link

@brody192
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants