0

signature_invalid when trying to get request_token

Hi, I started to develop a script to get contacts from a user. Before to get contacts, I am having problem to get request token, when I perform a request for a link like this:

<a class="yahoo" href="https://api.login.yahoo.com/oauth/v2/get_request_token?oauth_nonce=<?php echo uniqid() ?>&oauth_timestamp=<?php echo time() ?>&oauth_consumer_key=<?php echo $yahoo_consumer_key ?>&oauth_signature_method=plaintext&oauth_signature=<?php echo $yahoo_consumer_secret ?>&oauth_version=1.0&xoauth_lang_pref=en-us&oauth_callback=<?php echo urlencode('http://myfullurl.com') ?>">Get Contacts</a>

I get an HTTP header 401 Forbidden with message: oauth_problem=signature_invalid

I do not know if I am setting the link correctly but It was what I have understand through http://developer.yahoo.com/oauth/guide/oauth-sign-plaintext.html

by
2 Replies
  • You probably fixed this by now, but I just had the same problem, you need to add "%26" after the customer secret if you are doing the get_request_token and you don't have that token secret to add, so if just using the customer secret as signature, add "%26".

    See "oauth_signature" area here:
    http://developer.yahoo.com/oauth/guide/oauth-requesttoken.html 

    Yahoo could have made this more visible, I am sure many users are having this problem.
    0
  • Thanks Adrian.  Very helpful!
    0

Recent Posts

in Contacts