You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Railway CLI currently only supports project-level API tokens for authentication but does not support account-level API tokens. Adding support for account-level tokens would enable integration with tools like the 1Password Shell Plugin, allowing for easy (and secure) authentication across multiple projects when using the CLI locally.
What's the problem
When using a project-level API token, commands like the following work as expected:
RAILWAY_TOKEN="my_project_level_api_token" railway run
However, the CLI does not support account-level API tokens. If attempted:
RAILWAY_TOKEN="my_account_level_api_token" railway run
The command fails, limiting authentication to single-project tokens only.
Potential solution
Allow the Railway CLI to accept account-level API tokens, so commands like:
RAILWAY_TOKEN="my_account_level_api_token" railway whoami
# or
RAILWAY__ACCOUNT_TOKEN="my_account_level_api_token" railway whoami
return the user’s account details! ✨
Reference
This feature would improve compatibility with tools like 1Password's CLI Shell Plugin. See the related issue on 1Password's open-source shell plugin repo here.
The text was updated successfully, but these errors were encountered:
@brody192 Thanks man, this is exactly what I was looking for! 💯
Perhaps the official documentation could be updated here to mention that an account-level token could be passed on as RAILWAY_API_TOKEN since I couldn't find this info anywhere else.
Summary
The Railway CLI currently only supports project-level API tokens for authentication but does not support account-level API tokens. Adding support for account-level tokens would enable integration with tools like the 1Password Shell Plugin, allowing for easy (and secure) authentication across multiple projects when using the CLI locally.
What's the problem
When using a project-level API token, commands like the following work as expected:
RAILWAY_TOKEN="my_project_level_api_token" railway run
However, the CLI does not support account-level API tokens. If attempted:
RAILWAY_TOKEN="my_account_level_api_token" railway run
The command fails, limiting authentication to single-project tokens only.
Potential solution
Allow the Railway CLI to accept account-level API tokens, so commands like:
return the user’s account details! ✨
Reference
This feature would improve compatibility with tools like 1Password's CLI Shell Plugin. See the related issue on 1Password's open-source shell plugin repo here.
The text was updated successfully, but these errors were encountered: