oauth.signpost.exception.OAuthNotAuthorizedException: Authorization failed (server replied with a 401). This can happen if the consumer key was not correct or the signatures did not match

tsanand129
@tsanand129 Anand Sreenivasan

I am using the following libraries for Android-Twitter integration
signpost-commonshttp4-1.2.1.1.jar
signpost-core-1.2.1.1.jar
twitter4j-core-2.1.11.jar

The error message is same as indicated at the beginning of the thread

"oauth.signpost.exception.OAuthNotAuthorizedException: Authorization failed (server replied with a 401). This can happen if the consumer key was not correct or the signatures did not match."

34 weeks 4 days ago

Replies

episod
@episod Taylor Singletary

See Troubleshooting OAuth 1.0A for some tips on troubleshooting OAuth.

34 weeks 3 days ago
VinceJohnson4
@VinceJohnson4 Vince Johnson

Please verify whether the device DATE and TIME are up to date. If not, then it might cause problems with the access token.

21 weeks 6 days ago
taccount3929
@taccount3929 Test Account

Here below is the error message.

Error during OAUth retreive request token
oauth.signpost.exception.OAuthNotAuthorizedException: Authorization failed (server replied with a 401). This can happen if the consumer key was not correct or the signatures did not match.

Please HELP!!!

21 weeks 1 day ago
harrymash2006
@harrymash2006 hardik mashru

I am also having the same error. Please help

17 weeks 2 days ago
baigimran80
@baigimran80 Imran

change the callback url to 'oob'

final String url = provider.retrieveRequestToken(consumer, "oob");

This is happening because ur app type is desktop

i saw the same error

16 weeks 6 days ago
vikrmsinh_kadam
@vikrmsinh_kadam Vikram Kadam

I am also having the same error. Check with setting device date and call back url also but not working.
My app is working on some devices and gives problem on Samsung galaxy ace. And gives error:
oauth.signpost.exception.OAuthNotAuthorizedException: Authorization failed (server replied with a 401). This can happen if the consumer key was not correct or the signatures did not match.
But If Consumer key is not correct then why it is working on other devices. Not getting
this...... Below is my code where i get this exception.
String url = "";
try {
url = provider.retrieveRequestToken(consumer,
OAUTH_CALLBACK_URL);
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url))
.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP
| Intent.FLAG_ACTIVITY_NO_HISTORY
| Intent.FLAG_FROM_BACKGROUND);
context.startActivity(intent);
} catch (Exception e) {
e.printStackTrace();
Log.e(Common.TAG, "Error during OAUth retrieve request token"+ e);
}
return url;
}
I am using following libs.
1. signpost-commonshttp4-1.2.1.1.jar
2. signpost-core-1.2.1.1.jar
3. signpost-jetty6-1.2.1.1.jar
4. twitter4j-core-2.1.11.jar

14 weeks 2 days ago
ntbang
@ntbang Nguyen Trong Bang

me too

8 weeks 4 days ago
mishraranajitan
@mishraranajitan Ranajit mishra

My app throwing this error " Error during OAUth retrieve request token"... what will be the solution... help

4 weeks 2 days ago
ramespark
@ramespark Rames Palanisamy

You can resolve like
1. In your twitter application settings [in twitter page: https://dev.twitter.com/apps], make sure you make the application Read & Write
2. Also, fill the call back URL and do not leave it blank.

3 weeks 5 hours ago