Reputation: 35346
I registed for a Yahoo Messenger SDK api and plugged-in the consumer key/sercret into this code:
However, I'm getting this error:
Exception in thread "main" org.scribe.exceptions.OAuthException: Response body is incorrect. Can't extract token and secret from this: 'oauth_problem=consumer_key_rejected'
at org.scribe.extractors.TokenExtractorImpl.extract(TokenExtractorImpl.java:41)
at org.scribe.extractors.TokenExtractorImpl.extract(TokenExtractorImpl.java:27)
at org.scribe.oauth.OAuth10aServiceImpl.getRequestToken(OAuth10aServiceImpl.java:52)
at com.yahoodemo.YahooExample.main(YahooExample.java:28)
I'm pretty sure that the consumer key/secret is correct because I can get the 'RequestToken' using the same key/secret with a generic HTTP GET request.
Is this a bug in the Scribe library or it's something else?
Upvotes: 2
Views: 1461
Reputation: 1499
The solution from Nagendra worked for me but don't forget to refresh the Yahoo Project page as both the key and the secret code are changed after editing the permissions.
Upvotes: 1
Reputation: 78
Even i faced the same problem. But i finally found that: In developer accounts (http://developer.apps.yahoo.com/projects) After creating the project, Don`t forgot to give alteast one permission for the application like: Contacts - READ, Knowledge Plus- READ. Finally save
Upvotes: 5