Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OAuth token rejected error

I want to get user profile for which I am using OAuth. http://developer.yahoo.com/oauth/guide/oauth-auth-flow.html

I have retreived the access token and now finally I need to call yahoo api by making a GET request according to http://developer.yahoo.com/oauth/guide/oauth-make-request.html#

The GET request I am sending is:-

http://social.yahooapis.com/v1/user/KMDUY7SWWTJOX4AS3XR47PNLQU/profile?format=json
&realm="yahooapis.com"
&oauth_consumer_key=my key
&oauth_nonce=24829.2331
&oauth_signature_method=plaintext
&oauth_timestamp=1219450170
&oauth_token=whole token here
&oauth_version=1.0
&auth_signature="consumer secret + token secret"

When I am sending this request it is giving me this error:-

 {"error":{"lang":"en-US","description":"Please provide valid credentials. OAuth oauth_problem=\"token_rejected\", realm=\"yahooapis.com\""}}

Thankyou for your time and consideration.

like image 598
Saumyaraj Avatar asked Jul 10 '26 10:07

Saumyaraj


1 Answers

I was having this issue for a while and then eventually I figured out that Yahoo! puts A= at the beginning of all of their access tokens in their response, but that is not actually part of the access token, so you should be sure to remove that part before responding back to Yahoo!

I hope this helps someone else that stumbles upon this page in the future.

like image 104
RevolutionTech Avatar answered Jul 13 '26 16:07

RevolutionTech