0

OAuth Error Handling

I am new both to the Yahoo platform and OAuth itself, so forgive me if the answer here is obvious. I signed up for a Yahoo application and started playing around with the Java OAuth library available from Google. Just to test the connectivity, I created this request (with both 'testing' and 'foobar' replaced with valid data):

CODE
https://api.login.yahoo.com/oauth/v2/get_token?oauth_token=testing&oauth_consumer_key=1234&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1236639380&oauth_nonce=363765057481384&oauth_version=1.0&oauth_signature=foobar


The response surprised me. It has a status code of 200, but includes the following problem in the header:

CODE
oauth_problem=consumer_key_unknown<!-- oauth01.member.sk1.yahoo.com uncompressed/chunked Mon Mar  9 16:10:29 PDT 2009 -->


I assumed I had somehow copied the consumer key incorrectly, so I tried changing the key to something that was definitely wrong (removing several characters). Now the response has a status code 401 with the following in the header:

CODE
oauth_problem=consumer_key_unknown


If there was a problem in my first request, why is the status code 200? Could this just be an issue that my newly created consumer key needs to be propagated? Am I doing something dumb here?

by
1 Reply
  • Wow, the formatting on this forum is horrendous. Let me try that again in the hopes that someone can actually read what I wrote:


    I am new both to the Yahoo platform and OAuth itself, so forgive me if the answer here is obvious. I signed up for a Yahoo application and started playing around with the Java OAuth library available from Google. Just to test the connectivity, I created this request (with both 'testing' and 'foobar' replaced with valid data):

    CODE
    https://api.login.yahoo.com/oauth/v2/get_token?
    oauth_token=testing&
    oauth_consumer_key=1234&
    oauth_signature_method=HMAC-SHA1&
    oauth_timestamp=1236639380&
    oauth_nonce=363765057481384&
    oauth_version=1.0&
    oauth_signature=foobar


    The response surprised me. It has a status code of 200, but includes the following problem in the header:

    CODE
    oauth_problem=consumer_key_unknown<!-- oauth01.member.sk1.yahoo.com uncompressed/chunked Mon Mar 9 16:10:29 PDT 2009 -->


    I assumed I had somehow copied the consumer key incorrectly, so I tried changing the key to something that was definitely wrong (removing several characters). Now the response has a status code 401 with the following in the header:

    CODE
    oauth_problem=consumer_key_unknown


    If there was a problem in my first request, why is the status code 200? Could this just be an issue that my newly created consumer key needs to be propagated? Am I doing something dumb here?
    0

Recent Posts

in OAuth General Discussion YDN SDKs