About "Could not authenticate with OAuth." error


#1

Hello,

I created my own app with the new “Read, write, and direct messages” access level.

I tried to access this app via OAuth by inputting PIN and I could login well.
But I can’t read my own timelines, including home timeline, with the error “Could not authenticate with OAuth.”.

I checked my settings. In the user setting page, https://twitter.com/settings/applications, I have the “Read, write, and direct messages” access level for this app. On the other hand, in “Your access token” of the app setting page, https://dev.twitter.com/apps/<app_id>/show, I have the only “Read and write” access level.

Furthermore, about my another app, some of users can access their own timelines with the “Read, write, and direct messages” access level correctly, but some of users can not access them with the above errors although they all use the same OAuth login system.

Does the new official permission system have some problems or do I use it wrongly? How can I fix this?

Thank you.


#2

Hi,

I’m trying to fix this and maybe the authentication via OAuth itself doesn’t work well after you changed the permission model although I didn’t change my codes related to OAuth at all. I have used this OAuth library: http://code.google.com/p/oauth/

For example, the following generated url fails with 401 error.

http://api.twitter.com/1/saved_searches.json?oauth_signature_method=HMAC-SHA1&oauth_consumer_key=VXgiQRaXX59QqnREW5rM5g&oauth_token=106868225-9kyz95rSCyNhdlEsZDkPi5YrBvs6GD8ssoixkhqQ&oauth_timestamp=1310543927&oauth_nonce=8con1G&oauth_signature=MjKxlj3D7kL9y1SlIgt9ISlZ810%3D

Generated urls with the same library had worked well before the permission model changed.


#3

I solved this by changing the urls in initOAuthWithDelegate in SA_OAuthTwitterEngine to use https instead of http. Fix is detailed at http://www.musicalgeometry.com/?p=1537


#4

Hello,

I also created my own app with the new “Read, write, and direct messages” access level.

I tried to access this app via OAuth by inputting PIN and I could login well.
But I can’t read searches,my own timelines, including home timeline, with the error “Could not authenticate with OAuth.”.

I checked my settings. In the user setting page, https://twitter.com/settings/applications, I have the “Read, write, and direct messages” access level for this app. On the other hand, in “Your access token” of the app setting page, https://dev.twitter.com/apps//show, I have the only “Read and write” access level.


#5

I guess I just found the solution to this problem.

In the user account settings, there’s an “Always use HTTPS” option. If this option is checked, then all the authenticated requests for that user must be HTTPS. I was sending some requests with HTTP (not secure), and was getting that error for users with the option checked. Switching all my requests to HTTPS did the trick. I don’t know if this is documented anywhere, but I couldn’t find any mention in the docs.

The error is not directly related to OAuth and the message Twitter returns is a bit misleading, though.


#6

I don’t have the always HTTPS option checked and still it returns the same error.


#7

hi…
I shared on twitter its not worked because could not authenticate with OAuth.
any one give me solution me.


#8

See [node:204] for some tips on common OAuth problems. For folks to assist you with OAuth on these forums, a lot more information is needed than just the error you received.


#9

I’m writing a library to Android like that of Facebook(WebView integrated in the App), and I had the same problem! The error was in the creation of “signature”, you must use the “secretkey” and “TokenSecret” concatenated with the character “&”. Sorry for my bad English but I’m Italian :slight_smile:


#10

Soon I will be online with my new website www.omnishopping.nl
all about health


#11

binnekort online met www.omnishopping.nl
alles over afvallen met plezier, gezondheid en meer goeie tips.


#12

Duurd even maar de Robot van de zoekmachines hebben ook niet om het leven gevraagd.


#13

www.omnishopping.nl alles over afvallen …vreet je dun


#14

yeah same problem my application was working perfectly until yesterday. Now it doesn’t get authorization. The oauth goes fine but the app is not authorized so it doesn’t post and I have done nothing. Does anybody have some sort of rational explanation for this?


#15

I also ran into the similar issue. I am using console and web application to pull the tweets. When I was using web only it worked. After I added the console, it works for console only. In local web page I get-400 bad request. In intranet site-used for dev testing-I am getting-unable to connect to remote server!! Web page is hosted from Umbraco-which uses date in dd/mm/yyyy. But it was working previously??


#16

contact.com.de - working very goood with this type of signin/login
check the style of autorisation …