"Invalid token: API request failed" with sentry-cli login

I can’t seem to log in with sentry-cli login. I have created a new token in Settings > Account > API > Auth Tokens, and granted all scopes. However, I can’t seem to be able to login:

sentry-cli login
This helps you signing in your sentry-cli with an authentication token.
If you do not yet have a token ready we can bring up a browser for you
to create a token now.

Sentry server: sentry.io
Open browser now? [y/n] n
Enter your token: <my_token>
Invalid token: API request failed
* Closing connection 0

What am I missing?

1 Like

I have the same problem.
I tried to put token to ~/.sentryclirc file, pasting it to command line, but with no success.

Hmm… I think that is one of “it’s not a bug, it’s feature” kind…
After running $ sentry-cli login command still I have to paste my token, and I’m still in my bash shell (and that was confusing when I tried to run it last time).
But after that, when I run $ sentry-cli projects -o my_org list it prints out list of my projects. So it works :slight_smile: