0

please help! (401) Unauthorized.

I am only trying to get a requestion token, but it alwasy return the error: The remote server returned an error: (401) Unauthorized.
the following is my request string:

https://api.login.yahoo.com/oauth/v2/get_re...h_nonce=6566602
&oauth_timestamp=1275402028
&oauth_consumer_key=(I am hidding the key)
&oauth_signature_method=HMAC-SHA1
&oauth_signature=8vbXjt%2f07ERhal%2fvyKFL7bFyFQc%3d
&oauth_version=1.0

by
2 Replies
  • Hi Steven,

    In comparing your request with that defined in the request token fetch stage (http://developer.yahoo.com/oauth/guide/oauth-requesttoken.html) what I can see off the bat is that you're missing the oauth_callback parameter, which should match the application URL which you used to get the application key. The xoauth_lang_pref is optional, so there's no need to include that. Here's the dump of a sample request:

    https://api.login.yahoo.com/oauth/v2/
    get_request_token?oauth_nonce=ce2130523f788f313f76314ed3965ea6
    &oauth_timestamp=1202956957
    &oauth_consumer_key=123456891011121314151617181920
    &oauth_signature_method=plaintext
    &oauth_signature=abcdef
    &oauth_version=1.0
    &xoauth_lang_pref="en-us"
    &oauth_callback="http://yoursite.com/callback"

    - Jon
    0
  • Yet it doesn't work, as for me.
    I just fill the correct values and still get 401 Unauthorized.
    If I enter the URL directly in the browser I get Custom port is not allowed or the host is not registered with this consumer key.
    0

Recent Posts

in Contacts