Reputation: 1250
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.
Upvotes: 3
Views: 2021
Reputation: 1048
As they say in the Yahoo documentation here:
For requests to Yahoo API and Web services that require OAuth authorization, you must use the HMAC-SHA1 encryption method because requests are made insecurely using HTTP.
Upvotes: 0
Reputation: 1404
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.
Upvotes: 2
Reputation: 109
probably in your case the issue is related with the protocol. You should use https when calling the Yahoo! API.
Upvotes: 0