Search code examples
javayahooscribe

oauth_problem=consumer_key_rejected using Scribe library


I registed for a Yahoo Messenger SDK api and plugged-in the consumer key/sercret into this code:

https://github.com/fernandezpablo85/scribe-java/blob/master/src/test/java/org/scribe/examples/YahooExample.java

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?


Solution

  • 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