R
Railway3mo ago
Aryan

Railway CLI account-level API token support (for 1Password Shell Plugin)

I know the Railway CLI supports project-level API tokens, which work like this:
RAILWAY_TOKEN="my_project_level_api_token" railway run
RAILWAY_TOKEN="my_project_level_api_token" railway run
However, when I try using an account-level API token:
RAILWAY_TOKEN="my_account_level_api_token" railway run
# or
RAILWAY_TOKEN="my_account_level_api_token" railway whoami
RAILWAY_TOKEN="my_account_level_api_token" railway run
# or
RAILWAY_TOKEN="my_account_level_api_token" railway whoami
It doesn’t work, and I couldn’t find any documentation about this. Is account-level token support available, or could it be added? This feature would be useful for integrations like the 1Password Shell Plugin. Thanks!
Solution:
i am updating the docs right now! edit, updated! - https://docs.railway.app/guides/cli#tokens...
Jump to solution
3 Replies
Percy
Percy3mo ago
Project ID: N/A
Aryan
Aryan3mo ago
Edit: Solved now. See this GitHub issue for more info. All you need to do is pass a RAILWAY_API_TOKEN as your account-level API token and it works great. Below example shows how you can use it:
RAILWAY_API_TOKEN="my_account_level_api_token" railway whoami
# Shows your account info
RAILWAY_API_TOKEN="my_account_level_api_token" railway whoami
# Shows your account info
Feel free to mark this post as Solved.
Solution
Brody
Brody3mo ago
i am updating the docs right now! edit, updated! - https://docs.railway.app/guides/cli#tokens
Want results from more Discord servers?
Add your server