Rishikant181 / Rettiwt-API

A CLI tool and an API for fetching data from Twitter for free!
https://rishikant181.github.io/Rettiwt-API/
MIT License
490 stars 46 forks source link

Failed to authenticate using the given account Credentials #578

Closed Char0nDev closed 3 months ago

Char0nDev commented 3 months ago

i enter the right credentials but the display the error ( Failed to authenticate using the given account Credentials)

Rishikant181 commented 3 months ago

Do you have 2FA enabled?

Char0nDev commented 3 months ago

Do you have 2FA enabled?

no

Char0nDev commented 3 months ago

@Rishikant181

Rishikant181 commented 3 months ago

Did you try enclosing you credentials in double quotes like this?: rettiwt auth login "email" "username" "password"

Char0nDev commented 3 months ago

Did you try enclosing you credentials in double quotes like this?: rettiwt auth login "email" "username" "password"

i do it with "" and without "" but the same result

Rishikant181 commented 3 months ago

Try it and see if it works

Char0nDev commented 3 months ago

i do it with "" and without "" but the same result

Char0nDev commented 3 months ago

image

Char0nDev commented 3 months ago

@Rishikant181 it is diplay it

Rishikant181 commented 3 months ago

Try logging in to Twitter from a browser using the same account, then try rettiwt auth again.

Char0nDev commented 3 months ago

Try logging in to Twitter from a browser using the same account, then try rettiwt auth again.

i already try that

Char0nDev commented 3 months ago

the credentials are 100% right

Char0nDev commented 3 months ago

@Rishikant181

Rishikant181 commented 3 months ago

Okay I have a temporary workaround:

  1. Open your browser and go to twitter/X.
  2. Open browser developer tools.
  3. Navigate to Applications->Cookies (for Chrome) or Storage->Cookies (for Firefox).
  4. Copy the values of the 4 fields: auth_token, ct0, kdt, twid. Store them temporarily somewhere.
  5. Open NodeJS in a terminal and execute the command: btoa("auth_token=<auth_token_value>;ct0=<ct0_value>;kdt=<kdt_value>;twid=<twid_value>")
  6. The output string is your API_KEY.

I'll be trying to reproduce the error. So far, I couldn't (it's working as expected for me).

On a side note, this has been a long standing issue, which I have not been able to reproduce myself. For some people, it throws the error, while it works after some time. This workaround help you continue your work (hopefullt).

I'll be keeping this issue pinned.

Rishikant181 commented 3 months ago

Duplicate of #493

Rishikant181 commented 3 months ago

@Char0nDev All updates regarding this issue will be tracked at #493

Rishikant181 commented 3 months ago

@Char0nDev The earlier posted code was incorrect, please check again.