0

Getting invalid signature error during get_request_token

Hi,

I am getting invalid signature error while making request using curl as following

curl https://api.login.yahoo.com/oauth/v2/get_request_token -d "oauth_nonce=4376075&oauth_timestamp=1272377929&oauth_consumer_key=dj0yJmk9RXlmdVNzbmFUMj9WVdrOWJXbE5ibEZxWNHbzlNVEkzT0RVMk5
qSS0mcz1jb25zdW1lcnNlY3JldCZ4PTg2&oauth_signature_method=PLAINTEXT&oauth_signature=d5bc340af1559b897dc96e3b5628deb30e98d93d%2526%26&oauth_version=1.0&oauth_callback=http%3a%2f%2fwww.mysite.com%2fdefault.aspx" -v -k

(the consumer key of the above request is slightly modified for privacy.)

Can someone please tell me whats wrong with the request?

by
7 Replies
  • Hi,

    Can you please try 'oauth_signature=d5bc340af1559b897dc96e3b5628deb30e98d93d%26' and see if it works?

    Thanks,
    Yu Wang
    Yahoo! Membership team
    0
  • Hi,

    Thanks a lot, it worked! my mistake was re-encoding the signature using HttpUtility.UrlEncode(). But I am getting the same error with get_token now.

    curl https://api.login.yahoo.com/oauth/v2/get_token -d "oauth_consumer_key=(private)&oauth_signature_method=PLAINTEXT&oauth_signature=d5bc340af1559b897dc96e3b5628deb30e98d93d%26&oauth_timestamp=1272451400&oauth_version=1.0&oauth_token=uctqz4c&oauth_nonce=4413215&oauth_verifier=yk4tww" -v -k

    Whats wrong now? :(Please help, thanks.
    0
  • Hi,

    After your call to get_request_token, you get oauth_token_secret
    back. Then in your get_token call, your signature for PLAINTEXT
    should be <ckey>%26<oauth_token_secret>.

    You can check the OAuth spec for details:
    http://oauth.net/core/1.0a/#anchor21

    Thanks,
    Yu Wang
    0
  • Hi,

    Thanks, it worked, but with a little change. The correction was <consumer_secret>%26<oauth_token_secret> instead of <ckey>%26<oauth_token_secret>.

    Now while requesting for contacts list for a yahoo user my request is

    http://social.yahooapis.com/v1/user/(GUID)...jLu6q5HcXmi2X8=

    ...showing (501 Parameter Transmission Not Supported) error, need help again.....thanks.
    0
  • CODEBOX
    http://social.yahooapis.com/v1/user/(GUID)/contacts?format=XML&oauth_consumer_key=(private)&oauth_nonce=7167150&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1272635228&oauth_token=A%3D2Uov6JrLgRAPBF00ItsxuEdhg558OB11QoKIJ3Sg7gX_riCnusw4p3P5RFv2p_Kh8h3LyvPH9qE5np
    h6TLqMIUBJexOtgUYznFm.i8Lpx0a06STGgNAKGHH5ros9YHAqPSVpNYCYyETLcGg8qg7YXtsw3I7H2lS
    FmJx3ehhJuR567Gj_i68wWy2byPIZhj1wHUD5vuPbVRD2egqRUWmQFxWJpyZc6KbnvIWoBshRcvI3g2Om
    S9jgpT_DNLa1fsWmP4SbN329OPRUFFOS96Rdj_qhDdCVcUTDGtaXMULLzO_k2UNqUWyt2Hcx7fjiXv7GY
    xkJGoZewdhoCYSIbiNtZqnEAToKXvgArFrKctG1TW0q92DTgonCfDmgUaWzKgoD6Xt0Cbv3YBryiiVyTK
    PBJ4kHI3j47XcV.lxwPacK2VBxUmGD5rgQ7p4JVufKW0qH4tHaCQktJ7FwXoyeNuRHeqqOobWs9DfvDYx
    v9jW53SAvuGCxfJs4pTsrZCW28ea2HuxohonsBoK78Pkf4pRsHAIW_BPKcg_FoYQiC7fUckHhiHr2Ufis
    ZHYJ8KVtnFr6w0LF7Jl6ERA9lWa3VIELesr14p.2o4Zh.l0eCrkLTQ4uY6lfzm2uFd4Budk.hn.0i6dc5
    J0KqhfVAfCQ0UeATAlFV7NyxqawEfHs1JWPSP1qUuajYgR1RqyNJ0BW.qJBIiyRww--&oauth_version=1.0&oauth_signature=IihrpMtJynX+JjLu6q5HcXmi2X8=
    0
  • Hi,

    Since there is no more oauth_signature_invalid error and the error response
    doesn't indicate there is anything wrong with the OAuth protocol parameters,
    you may want to check with the Social Directory API forum for assistance:
    http://developer.yahoo.net/forum/index.php?showforum=43

    Thanks,
    Yu Wang
    0
  • Anyway, thanks a lot for your help.
    0

Recent Posts

in OAuth General Discussion YDN SDKs