Android: Can login with Consumer keys from another live account but not for a new account


We’ve created Android apps before that invoke a Twitter login on a message post.

In the current app we’re working on we get a 401 error with “user / password combination seems to be invalid”.

If we ‘borrow’ another customers Twitter API keys it all works okay, and there’s no apparent setting difference between the accounts. If we generate new keys it still doesn’t work.

The app says it is approved for use with Twitter and Twitter admin tell us there’s nothing wrong with the account.

It still smells like an account issue as the functionality works completely with their keys.

Any clues?

= Martin =


I am getting the same problem.


Is this related to OAuth Tool Temporarily Down??


same issue here!!!
I guess the problem comes from their current maintain…


Is there any official position on this from Twitter? We’ve tested the keys on Twitter4J on Andorid and also using FHSTwitterEngine on iOS - same problem, other existing api keys work, these new one’s don’t. I don’t know where to go next - there doesn’t seem to be any support from Twitter, when I used their support system they told me to use the Forum.


I’m still waiting for an acceptable response on this. It’s now been 5 days

If nobody can give a solution does anybody know how to get support from Twitter on this?


Further evidence that it’s an account issue is if we use the keys in another app (that works with it’s own keys) the new app keys fail to allow login with the 401 error.


Hi, can you help me to understand the exact issue here? I’m a bit confused by the multiple references to “app keys”. Here’s what I think I’m reading:

You’ve got an Android app, and you’ve created an app at against an account (yours?), and put the API key/secret into your application code.

When you login to that app with one user ID, the OAuth token works; but if you login with another user ID, the token doesn’t work?

Can you clarify? thanks so much.


Hi Andy, trying to be concise isn’t always helpful! :slight_smile: Thanks for jumping in.

The objective is to provide a post to Twitter from our Android app. We’ve created a corresponding Twitter app to enable this and are using Twitter4J. We use the given App ID and Secret in the configuration, but when the user logs on we get the 401 error with “user / password combination seems to be invalid”. We’ve tried regenerating keys with no improvement.

We then tried three eliminations:

  1. We took the App ID and Secret from another Android app that we’ve released and is already working with Twitter, and used that instead of the key pair for the new app. This allows the user to log on. This suggests that the implementation in the new app is okay

  2. We used the given App ID and Secret for the new app, and tried it in a debug version of the working app. This now stopped the user from logging on with the same error. This confirms there is an issue with the account/keys

  3. We tried using the keys in a working iOS app in lieu of the working keys and that stopped working. Further confirmation of the account/keys problem

This makes it clear to me that there’s something broken in the account - the account shows it is approved and live, and Twitter support have not identified a fault with it. It appears that other people have also seen this same issue recently.

Now we may have done something subtly different in the account setup, but from where we sit it is impossible to resolve what is wrong.

Thanks in anticipation of pointing out the obvious mistake we’ve made. :slight_smile:


Furthermore, if we test using the new app’s AppID/Secret and hard code the Access Token/Secret into the app it allows us to post a Tweet to our own account. Again showing that the implementation is sound but something is preventing login to the user’s account and recovering their credentials to allow the post.


This is the API call we use that fails:


Thanks for this additional detail, much more clear to me now.

As you said, this is really odd and it does sound like there’s a specific issue with that one app / account combined with the user tokens. Your detailed debugging seems to indicate there’s no “obvious mistake”.

Have you tried creating a third app (assuming existing working Android app is one, and problem app is the second…) and combining keys from that, with the user login?


Android app or Twitter app? :wink:


Twitter app - i.e. to get new keys.


Hi Andy, it happened on any newly created Twitter app - this was a test we did at the time, I didn’t capture that one. (And we did refresh the page when we generated new keys)


Hi Andy - is there something else we can try, or is there some background investigation going on?


I’m stumped at the moment and haven’t been able to reproduce :-/


How about we have a private conversation and I provide you with the keys (although you may already be able to access those with super-Twitter-staff-powers).


Hi Andy - it’s been a few days since you’ve responded - where are we to go next?


We’re still waiting for responses from yourself or support