0

Getting Internal error when trying to authenticate

Hi, Have been having all sorts of problems authenticating. I am using the sample application provided with the yahoo php social api. I have tried signature method as plaintext, HMAC-SHA, provided a callback URL and now "oob".

This is what I get as a result with plaintext and callback set to oob:

DEBUG OBJECT - Array ( [method] => POST [url] => https://api.login.yahoo.com/oauth/v2/get_request_token [code] => 500 [requestHeaders] => Array ( [0] => Accept: application/json [1] => Content-Type: application/x-www-form-urlencoded ) [requestBody] => oauth_callback=oob&oauth_consumer_key=dj0yJmk9ZDZ4YUhvMGdVUGRCJmQ9WVdrOWVYSXpjVlJYTjJVbWNHbzlNV
FV5TURBM01UWXkmcz1jb25zdW1lcnNlY3JldCZ4PTNi&oauth_nonce=1e16a39f00f296e05e4a123bab8e3420&oauth_signature=de0781a3611870dfb9f7c64281f9906ac7ac5594%2526&oauth_signature_method=PLAINTEXT&oauth_timestamp=1269454687&oauth_version=1.0 [responseHeaders] => Array ( [Date] => Wed, 24 Mar 2010 18:18:08 GMT [P3P] => policyref="http://info.yahoo.com/w3c/p3p.xml", CP="CAO DSP COR CUR ADM DEV TAI PSA PSD IVAi IVDi CONi TELo OTPi OUR DELi SAMi OTRi UNRi PUBi IND PHY ONL UNI PUR FIN COM NAV INT DEM CNT STA POL HEA PRE LOC GOV" [Connection] => close [Transfer-Encoding] => chunked [Content-Type] => text/html; charset=utf-8 ) [responseBody] =>

Need to get this issue resolved ASAP. Please let me know what other info you need.

Thanks in advance.

Bob

by
6 Replies
  • Hi Bob,

    It looks like your consumer key has been deleted. Are you sure it is shown in
    your projects list https://developer.apps.yahoo.com/projects?

    Can you please try with a new consumer key? We'll also check why it doesn't
    return an error like "consumer_key unknown" or "consumer_key deleted" message.

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

    Yes, I had not changed my api and secret on my production web site. I am now getting a 401 error with parameters reproduced below:

    DEBUG - HTTP request details DEBUG OBJECT - Array ( [method] => POST [url] => https://api.login.yahoo.com/oauth/v2/get_request_token [code] => 401 [requestHeaders] => Array ( [0] => Accept: application/json [1] => Content-Type: application/x-www-form-urlencoded ) [requestBody] => oauth_callback=oob&oauth_consumer_key=dj0yJmk9VWdOMEROR1FuYWp6JmQ9WVdrOU1ubG5aRVZETTJVbWNHbzlNa
    kE1T1Rrd056ZzJNZy0tJnM9Y29uc3VtZXJzZWNyZXQmeD1hNg--&oauth_nonce=b25163251fdf11475a22ea88c64b7d8a&oauth_signature=0c30f4c55703168350d1059423c606f19c764bf9%2526&oauth_signature_method=PLAINTEXT&oauth_timestamp=1269472066&oauth_version=1.0 [responseHeaders] => Array ( [Date] => Wed, 24 Mar 2010 23:07:47 GMT [P3P] => policyref="http://info.yahoo.com/w3c/p3p.xml", CP="CAO DSP COR CUR ADM DEV TAI PSA PSD IVAi IVDi CONi TELo OTPi OUR DELi SAMi OTRi UNRi PUBi IND PHY ONL UNI PUR FIN COM NAV INT DEM CNT STA POL HEA PRE LOC GOV" [WWW-Authenticate] => OAuth oauth_problem=signature_invalid [Connection] => close [Transfer-Encoding] => chunked [Content-Type] => application/x-www-form-urlencoded ) [responseBody] => oauth_problem=signature_invalid ) ERROR - Failed to create request token: signature_invalid ERROR - Failed to create request token

    Bob
    0
  • Hi Bob,

    Your consumer key is registered not requiring user authentication, so the
    get_request_token call is not applicable here.

    If you need to access user data such as Yahoo! Updates, Status and etc,
    then please make sure your consumer key belongs to the OAuth applications
    category:
    https://developer.apps.yahoo.com/projects

    Thanks,
    Yu Wang
    0
  • Hi Yu,
    This took care of the problem.
    Thanks,
    Bob
    0
  • I'm getting a 401 error when trying to authenticate. I've tried creating a new project and have used both plain text and HMAC-SHA. I use the exact same code to authenticate with Twitter and it works fine.

    https://api.login.yahoo.com/oauth/v2/get_re...port.aspx"
    0
  • Hi Anthony,

    Can you please open a new topic since yours seems to different from Bob's
    and his problem is resolved? Please also provide the complete response you
    got from Yahoo! OAuth server.

    If you have access to tool such as wget (http://www.gnu.org/software/wget/)
    or curl (http://curl.haxx.se/), you can construct the post request
    manually with either of the following commands:

    wget -S -d https://api.login.yahoo.com/oauth/v2/get_request_token --post-data="oauth_version=1.0&oauth_nonce=8c76a87ffd3e4f48b53ed4b669b0b35f&oauth_timestamp=1268432350&oauth_consumer_key=dj0yJmk9TUJETmxhUG9WbDlPJmQ9WVdrOWR6Um9kRkl3TXpRbWNHbzlNV
    GszTVRBM05USXhOQS0tJnM9Y29uc3VtZXJzZWNyZXQmeD02MQ--&oauth_signature_method=PLAINTEXT&oauth_signature=821ce9362da7d3d441265e77469a1339c42097612526&oauth_callback=oob"

    curl https://api.login.yahoo.com/oauth/v2/get_request_token -d "oauth_version=1.0&oauth_nonce=8c76a87ffd3e4f48b53ed4b669b0b35f&oauth_timestamp=1268432350&oauth_consumer_key=dj0yJmk9TUJETmxhUG9WbDlPJmQ9WVdrOWR6Um9kRkl3TXpRbWNHbzlNV
    GszTVRBM05USXhOQS0tJnM9Y29uc3VtZXJzZWNyZXQmeD02MQ--&oauth_signature_method=PLAINTEXT&oauth_signature=821ce9362da7d3d441265e77469a1339c42097612526&oauth_callback=oob" -v

    Then you can copy the response over here.

    Thanks,
    Yu Wang
    Yahoo! Membership Team
    0

Recent Posts

in OAuth General Discussion YDN SDKs