TwidereProject / Twidere-Android

http://twidere.com
2.76k stars 378 forks source link

Getting authentication error. Can't find where/how to sign out and sign back in #1475

Open GAferguson opened 1 year ago

GAferguson commented 1 year ago

Check before submitting issue -- Thank you!

You can ignore this form if this issue is a feature request.

Expected behavior

Actual behavior

Steps to reproduce

Extra info

Android version: (version code here)

Network type:

App version: (version code here)

Build variant:

Micro-blogging service:

App settings:

HiddenLeveI commented 1 year ago

Same issue, can't log back in now

jonas1015119 commented 1 year ago

same, my own custom API keys get rejected (because they dont have Elevated access?), default ones just do nothing. Please fix.

sdvcrx commented 1 year ago

https://9to5google.com/2023/01/12/twitter-api-appears-to-be-down-breaking-tweetbot-and-third-party-clients/

Qwerty-Space commented 1 year ago

Use these keys from the TwidereX app:

ConsumerKey=wmtrtTaVOjUnH5pWQp4LDI5Qs
ConsumerSecret=E9Q9u2yK0COJae2tLcNEdY75OPA3bxqJiGZQztraHaQUtoI2cu
fabioromeo commented 1 year ago

This solves the problem, thank you!

GONin3D commented 1 year ago

Unless I'm updating them wrong (likely) , the twidereX keys don't work for me 🙁

umbellipher commented 1 year ago

Worked for me when (with each key) I deleted 'ConsumerKey=' and 'ConsumerSecret=', and used the rest of it.

GONin3D commented 1 year ago

Got it! Had to update each, then try to add a new account, then authorized for my current account instead of creating a new one. It told me I was already logged in and everything loaded correctly.

vanhoopstallion commented 1 year ago

Thank you. This is the only useable twitter app for android

umbellipher commented 1 year ago

You can always access Settings when signed out, and it's in there as an option. Glad it worked out.

DrAndiLowe commented 1 year ago

Use these keys from the TwidereX app:

ConsumerKey=wmtrtTaVOjUnH5pWQp4LDI5Qs
ConsumerSecret=E9Q9u2yK0COJae2tLcNEdY75OPA3bxqJiGZQztraHaQUtoI2cu

How exactly? Can you provide clarification, please?

GONin3D commented 1 year ago

Use these keys from the TwidereX app:

ConsumerKey=wmtrtTaVOjUnH5pWQp4LDI5Qs
ConsumerSecret=E9Q9u2yK0COJae2tLcNEdY75OPA3bxqJiGZQztraHaQUtoI2cu

How exactly? Can you provide clarification, please?

What worked for me is:

  1. Go to Settings > Network > Avanced > Default API Settings
  2. Replace the consumer key and consumer secret with those above and save
  3. Go to Accounts and click the + in the top right
  4. Choose Twitter > User Settings
  5. Click Register, then the Sign In button, this should take you to an authorization page
  6. Go through the authorization steps
  7. Refresh your timelines

Granted, there's probably steps in this that you don't need to do or that may be faster since I'm not well-versed, but this specific set of steps had the correct amount of voodoo magic to get mine working.

DrAndiLowe commented 1 year ago

Use these keys from the TwidereX app:

ConsumerKey=wmtrtTaVOjUnH5pWQp4LDI5Qs
ConsumerSecret=E9Q9u2yK0COJae2tLcNEdY75OPA3bxqJiGZQztraHaQUtoI2cu

How exactly? Can you provide clarification, please?

What worked for me is:

  1. Go to Settings > Network > Avanced > Default API Settings
  2. Replace the consumer key and consumer secret with those above and save
  3. Go to Accounts and click the + in the top right
  4. Choose Twitter > User Settings
  5. Click Register, then the Sign In button, this should take you to an authorization page
  6. Go through the authorization steps
  7. Refresh your timelines

Granted, there's probably steps in this that you don't need to do or that may be faster since I'm not well-versed, but this specific set of steps had the correct amount of voodoo magic to get mine working.

Thanks! Not sure what I did, but I'm able to login to Twitter with Twidere (no 'X') using the Twidere X keys. I basically stabbed at my phone for a good 5 minutes, trying random stuff, until I got the browser login screen for Twitter. Then everything was working. Adding this for others to demonstrate that with perseverance this method works.

abelincoln8 commented 1 year ago

Use these keys from the TwidereX app:

ConsumerKey=wmtrtTaVOjUnH5pWQp4LDI5Qs
ConsumerSecret=E9Q9u2yK0COJae2tLcNEdY75OPA3bxqJiGZQztraHaQUtoI2cu

Great success. Thank you very much QS for the assist.

I noticed that I was unable to log in with 2FA set up so I had to revert, and then reinstate after authentication.

Also, every time a login failed the API key/secret would revert back to the prior input. I noticed that I had to verify on each login attempt that the "new" TwidereX key/secret were being used.

Best of luck to anyone out there I had a dark, dark 72 hours of having to communicate with my family.

civodul999 commented 1 year ago

Thank you for the new keys. Do you know if I can use my own keys if I generate them through my developer portal ?

keithzg commented 1 year ago

Do you know if I can use my own keys if I generate them through my developer portal ?

I can confirm this is true, though you may have to make sure to create a "standalone app" that uses v1.1 of the API. Possibly I fat-fingered something, or copied from the wrong field or such, when I tried at first with creating an "elevated" app from the Twitter developer dashboard, but for whatever reason it didn't work for me (a bit surprising since the developer dashboard implies that an "elevated" app supports both v1.1 and v2 of the API, so one would assume it would be backwards compatible, but perhaps expecting convenient behaviour from Twitter's API is foolish!)

EDIT: My v1.1 API key gives me an error indicating my app is read-only, I found Twitter's developer console oddly confusing though so I mighta just screwed something up. (The TwidereX key works fine for me, to join the chorus.)

Note too that you don't necessarily have to dive in and change the default API settings, you can also just enter the consumer secret and key when adding an account---there's a button up in the top-right, to the left of the settings button, in the Sign In page within Twidere when adding an account.

Tlaster commented 1 year ago

I've updated the remote API config for testing, it should resolve the issue for now, but there is no guarantee that Twitter will not block this API Key.

jonas1015119 commented 1 year ago

I've just started getting "Network Error: Empty Data" issues whenever I try to like a tweet. Everything else still seems to work, any ideas? (using the Twidere X keys)

EliasGagnef commented 1 year ago

I've just started getting "Network Error: Empty Data" issues whenever I try to like a tweet. Everything else still seems to work, any ideas? (using the Twidere X keys)

Same here, does anybody have any solutions? Everything works for me but not liking tweets

fusenuk commented 1 year ago

Trying to retweet also leads to a 'hit a daily limit' error.

It seems possibly that too many people are using the Twidere X keys compared to what their limits will allow.

It feels like the best solution will be for each person to get their own keys via a fake app in the developer portal.

EliasGagnef commented 1 year ago

I think that you are totally right @fusenuk, I followed the instructions from the Talon Github repository to get my own keys and it totally worked! Here's the instructions everyone:

To get your Twitter API key, go through these steps:

1: Sign in on their developer site (https://apps.twitter.com/)

2: Click Create New App.

3: Choose a name, description, and website. These are all required and unique to your app, but it makes no difference what you call them. Anything will work here.

4: For the callback URL, you can do anything you like, but to have it work out of the box, use: http://talonfortwitter.com (since we are using Twidere I guess you can put any website you want instead, but it doesn't matter)

5: If you want a different one (stressing that it really DOES NOT matter..) then change it in the LoginFragment

6: Read and accept their Rules of the Road, then Create your Twitter Application After it is created, you can change the icon and add some other info from the settings page.

7: You NEED to go to the Permissions page of the app and select the Read, Write and Access direct messages option, or else you won't be able to do anything but view your timeline.

Now go into your "new app", go into the "Keys and tokens" section and copy the API Key and Secret into Twidere using the steps from @GONin3D, I hope this helps someone :)

FritesMoules commented 1 year ago

Hi everyone,

I face the same issue on Twidere on my Android phone too ("incorrect api settings") so I wanted to try the above mentioned trick but I can't create a developer account visibly: I am stuck with the following message "There was a problem completing your request: User must have a verified phone number on file prior to submitting application."

I use Twidere for privacy purposes so ending up giving my phone number to Twitter to create a developer account doesn't make any sense to me.

Also, I'm not sure if it's related or not, but when I click on the 'Create an App' button, I have the following message:

"You may continue managing your existing Apps but if you would like to create new Apps or use Twitter premium APIs, please apply for a developer account.

As a developer platform, our first responsibility is to our users: to provide a place that supports the health of conversation on Twitter. To continue to prevent misuse of our platform, we have introduced a few new requirements for developers."

I didn't try using the Twidere X API keys as people are reporting here it's not always working great and chances are the use of these publicly available keys will be limited in the future as more and more people are using them (from what I've understood by reading above).

Can someone help me and tell me the best course of action? And also what's "wrong" with using Twidere-X instead of Twidere?

Thanks a lot guys, I am not a developer myself and I have limited understanding of all development related things, I'm just concerned about my privacy, so your help is precious and means a lot to me.

jonas1015119 commented 1 year ago

Do you know if I can use my own keys if I generate them through my developer portal ?

I can confirm this is true, though you may have to make sure to create a "standalone app" that uses v1.1 of the API. Possibly I fat-fingered something, or copied from the wrong field or such, when I tried at first with creating an "elevated" app from the Twitter developer dashboard, but for whatever reason it didn't work for me (a bit surprising since the developer dashboard implies that an "elevated" app supports both v1.1 and v2 of the API, so one would assume it would be backwards compatible, but perhaps expecting convenient behaviour from Twitter's API is foolish!) EDIT: My v1.1 API key gives me an error indicating my app is read-only, I found Twitter's developer console oddly confusing though so I mighta just screwed something up. (The TwidereX key works fine for me, to join the chorus.) Note too that you don't necessarily have to dive in and change the default API settings, you can also just enter the consumer secret and key when adding an account---there's a button up in the top-right, to the left of the settings button, in the Sign In page within Twidere when adding an account.

EDIT--- Managed to get it working by applying for elevated and using a Staging set application, probably my inexperience missed something though and that is unnecessary steps.

Looks like it only works if you have elevated access. What do you mean by Staging set application? My Elevated Application got denied because "It looks like your proposed use case may be in violation of one or more sections of the Developer Agreement and Policy, Automation Rules, and/or the Twitter Rules." Anyone have any success, what did you write? These are my current settings and I get the 453 Error when I go to the Authorization screen. image)

vanhoopstallion commented 1 year ago

Getting Error 32 "could not authenticate you" with twidere x keys this morning.

Edit: Twidere X looks to be locked out with the same keys

fusenuk commented 1 year ago

Yeah, it appears they've now blocked Twidere X

The new Twitter rules say 'no third party clients'

So it makes sense that we will now start to see nearly all consumer API keys start to get blocked for any largely used client

Worrying one of the posts above makes it look like they are also being selective on who can create new custom API keys as they don't want people using them for clients either.

Inrumpo commented 1 year ago

I can confirm that the "use Twidere X keys workaround" doesn't work anymore. In my case that trick stopped working roughly 16 hours ago.

jonas1015119 commented 1 year ago

I don't know why I didn't think of this earlier, but the official Twitter API Keys work!

  1. put in the Twitter for iPad(!) API Key (https://gist.github.com/shobotch/5160017)
  2. change authentication to XAuth
  3. put in your details (username and password) in the Twidere interface. (need to have 2 Factor disabled)

    Worked on the first try for me, you might need to remove your existing account or reinstall Twidere if you get errors.

Musketeiro commented 1 year ago

I don't know why I didn't think of this earlier, but the official Twitter API Keys work! Just put in the Twitter for Android API Key (https://gist.github.com/shobotch/5160017), change authentication to XAuth, put in your details and refresh. Worked on the first try for me, and you notification column will display likes for once!

Not working for me. Says the account has been suspended the moment I try to login (it hasn't).

GONin3D commented 1 year ago

My account locked after attempting to switch over :(

jonas1015119 commented 1 year ago

@Musketeiro thats odd, I tried both the Android and iPad keys. Android worked and can RT/Fav but I get an authentication error when trying to tweet, iPad Key works flawlessly.

Musketeiro commented 1 year ago

@Musketeiro thats odd, I tried both the Android and iPad keys. Android worked and can RT/Fav but I get an authentication error when trying to tweet, iPad Key works flawlessly.

Strange. I just tried with the iPad key and it worked with my backup account. When I tried to add my main account, I got the same message again.

Edit: I removed the account I managed to add. Now that one also displays the same message. Oh well, Albatross still works.

Hasan5750 commented 1 year ago

could someone provide a consumer key and consumer secret that works? or what do i type in username and password with xauth?

Hasan5750 commented 1 year ago

@Musketeiro thats odd, I tried both the Android and iPad keys. Android worked and can RT/Fav but I get an authentication error when trying to tweet, iPad Key works flawlessly.

Strange. I just tried with the iPad key and it worked with my backup account. When I tried to add my main account, I got the same message again.

Edit: I removed the account I managed to add. Now that one also displays the same message. Oh well, Albatross still works.

clean app cache in settings/apps and start fresh ,

StorageB commented 1 year ago

It was also required to remove my Twidere account from Android by going to Android Settings > Accounts.

Steps that worked for me:

  1. Clear Storage and Clear Cache for Twidere
  2. Remove Twidere account from Android (Android Settings > Accounts > Twidere > Remove Account)
  3. Enter keys per @jonas1015119 comment
  4. Open Twidere and log in.
fabioromeo commented 1 year ago

Does anyone knows what twitter sees besides the keys? Any chances of having the account banned for using those keys?

abelincoln8 commented 1 year ago

I still haven't been able to configure properly - getting 401 or 403 errors depending on which key I'm using.

That said, I want to thank everyone contributing here trying to figure it out - I feel like I'm not alone in this. Much appreciated.

jonas1015119 commented 1 year ago

@fabioromeo I highly doubt it, they have only been manually disabling API Keys for apps with a significant amount of users, which is why some niche apps still work. Since its using Twitters official Keys it should just look like someone posting through the official app. They might start trying to close those gaps in the future, but the amount of people using this method is so miniscule that its probably not worth it. Their rules ban the building of apps that mirror Twitter, not using one.

l17r commented 1 year ago

I still don't quite understand which Auth setting I should be using for this and how I should be adding the account; for me, it just throws different kinds of errors, no matter what I try.

FritesMoules commented 1 year ago

So I tried @jonas1015119 trick by using the official Twitter API Keys and it worked, but I was not able to add another account (I have two different Twitter accounts): I get an "error 401" message when trying to add the second account.

Any idea I can try to fix it?

Hasan5750 commented 1 year ago

I still don't quite understand which Auth setting I should be using for this and how I should be adding the account; for me, it just throws different kinds of errors, no matter what I try.

Unistall and reinstall twidere, xauth,

l17r commented 1 year ago

Using my own API Key gives me Error 403, using the Twitter for Android API Key gives me Error 500 …

Hasan5750 commented 1 year ago

Using my own API Key gives me Error 403, using the Twitter for Android API Key gives me Error 500 …

Unistall and reinstall twidere and try again,

l17r commented 1 year ago

Hm, I just did that, so there's probably something else I'm doing wrong.

vanhoopstallion commented 1 year ago

Hm, I just did that, so there's probably something else I'm doing wrong.

I get the same 401 or 403 depending on which keys i use. Some i get an email fromm twitter with a confirmation code but nowhere to enter it to confirm my account

Hasan5750 commented 1 year ago

Hm, I just did that, so there's probably something else I'm doing wrong.

I get the same 401 or 403 depending on which keys i use. Some i get an email fromm twitter with a confirmation code but nowhere to enter it to confirm my account

Disable 2 factor authentication,

vanhoopstallion commented 1 year ago

Already off. I've moved to lagopus. All in Japanese but it still works and handles lists ok

Hasan5750 commented 1 year ago

Already off. I've moved to lagopus. All in Japanese but it still works and handles lists ok

Try consumer key and consumer secret of Twitter for ipad

l17r commented 1 year ago

Wow, that … actually worked! <3

Musketeiro commented 1 year ago

Alright, I got it working with the iPad API key and with 2FA off. Can't seem to be able to access my lists though. Thanks for the help. Edit: Lists and a few other things seem to be working now.

Hasan5750 commented 1 year ago

Already off. I've moved to lagopus. All in Japanese but it still works and handles lists ok

Try this: oauth, password sign in, not sign in,