CLI bw login fails

Hi,

i am trying to login on cli.
i copied client id and client secrect always into a notepad to eliminate some characters or whitespace.

with bw login i entered email, password and client_secret (entering manually, copying or setting env BW_CLIENTSECRET=“************”).

it everytime throws me: Your authentication request appears to be coming from a bot. …

when i try bw login --apikey i entered client id and client secret or copied it or set the env variables.
it always tells me: {“response”:{“error”:“invalid_client”},“captchaRequired”:false,“statusCode”:400}

has someone any idea what i can try or i am doing wrong?

it is selfhosted and uptodate. i use mobaxterm for ssh…

br

Did you find a solution to this? I’m experiencing the same thing.

I am able to login using the following steps on a Win 10 machine:

  1. copied bw.exe in the same folder as my Bitwarden desktop app (C:\Users\Used_Name\AppData\Local\Programs\Bitwarden)
  2. run cmd from that path
  3. login using:
bw login --apikey
? client_id: 
? client_secret: 
You are logged in!
To unlock your vault, use the `unlock` command. ex:
$ bw unlock

Be careful to not have any spaces before or after the client_id/client_secret.

I am having the exact same problem. Has anyone found a fix for this?

I found, that, in my case, the config got deleted, so I was unknowingly authing to bitwarden.com, rather than to my own BitWarden server. :cone-of-shame: