0

How can I use yql with oauth?

now I get an oauth token of yahoo,
and request http://query.yahooapis.com/v1/yql?q=[command] to get data must have oauth,
how use oauth with yql ?
thank you!

by
6 Replies
  • Hi,

    We have a tutorial for using YQL and PHP.

    Paul wrote a blog post about requesting YQL with Javascript for 2-leg OAuth (no private user data).

    Hope that helps,

    Tom
    Yahoo! Developer Network
    0
  • The link to the PHP and YQL tutorial seems to return 404's now (http://developer.yahoo.com/yos/tutorials/sdk_yql.html)

    I believe the correct link is : http://developer.yahoo.com/yos/code_exs/sdk_yql.html

    Vipul

    QUOTE (sh1mmer @ Feb 19 2009, 08:26 AM) <{POST_SNAPBACK}>
    Hi,

    We have a tutorial for using YQL and PHP.

    Paul wrote a blog post about requesting YQL with Javascript for 2-leg OAuth (no private user data).

    Hope that helps,

    Tom
    Yahoo! Developer Network
    0
  • Thanks for posting that - our docs have changed so a few of these links have broken.

    - Jon

    QUOTE (its.dilbert @ May 20 2009, 05:12 PM) <{POST_SNAPBACK}>
    The link to the PHP and YQL tutorial seems to return 404's now (http://developer.yahoo.com/yos/tutorials/sdk_yql.html)

    I believe the correct link is : http://developer.yahoo.com/yos/code_exs/sdk_yql.html

    Vipul
    0
  • I program with java to use yql api

    I use oauth token to request yql api after get access token of yahoo.
    I use httpclient to send request(post method) to yql url: "http://query.yahooapis.com/v1/yql", and set request header like this:
    OAuth realm="query.yahooapis.com",oauth_signature="83SzG7zGaS8cgyB7NKR85RlI0FE=",oauth_nonce="JsZdswywH",oauth_version="1.0",oauth_signature_method="HMAC-SHA1",oauth_consumer_key="dj0yJmk9cElGeTJSaWZ3Z1RoJmQ9WVdrOVJFczJaRTA0TkdzbWNHbzlNekE1TkRZNU1UZzImcz1
    jb25zdW1lcnNlY3JldCZ4PWUz",oauth_token="A%3DklkGOi3fmVtH8ACsODzUuDRpT0aDLloB99hXVS0Xo4z4jsa8Esl4HWrnqmRIJF89PRd1JADqCpptfz
    1vM7yzT1Dm7bjHRvGchXqZFR64WrjRQd6jRQwcFTO4b56omJKrm3ZOZ5_IGQiaWWl20.GLyOdcAB8t4N
    D
    KyDku64l.OYFVir1VbhyNW8N1dETpQJDSXj1P0aOAc9i0iamat3GKNkC8Lz5H2GISg0KGCXSU0h79I28
    X
    6OmQP..HHw1GOKBomrEidydMBKzSDFNbemBIN7F4gY5dAobx91oSEJ1j6Vy_K0.fcXjeWpKCC2tHFGzy
    K
    no8CXJ5_Z5CnqyuGRtO7rpCzEJpWU7sVZS6UUd.6t5gVF7XxZG5tmrWm.Gtd1B_LRWHj0YKM3Kh7kZ4I
    u
    t1cC8yPCYxN2O6bYB5eTtqNG.zMMctm6BqUvA29dZVSP2im9UKWPEMVpfIQFZiUE6kd9VgS9MmjozFuu
    t
    Ap_N94SFYtm5F60f33QMdvLNW8j2XaHpS0AIczaU3Nhk_UPuCv2EvzkLKWLQuuYZWqTBbXUoCSRbXOB_
    J
    ERPPR7OwGPXZiHHnFlkf_Vl0i16Of74V3hhGZWQw67BTGBEV5RBZRbLV980fn45pWUxYfy.DxG9iac_6
    A
    PBsz4jGjJm95gTAb9Fxgw--"

    and set yql :show tables&format=xml

    run it ,and i get exception like this :
    I/O exception (org.apache.commons.httpclient.NoHttpResponseException) caught when processing request: The server query.yahooapis.com failed to respond
    org.apache.commons.httpclient.HttpMethodDirector executeWithRetry

    anyone could help me ? what is wrong ?
    0
  • Can you please try using the java example provided in a previous post?

    http://developer.yahoo.net/forum/index.php?showtopic=283

    This should work for 2 legged oauth with java.

    -- Nagesh
    0
  • QUOTE (Nagesh Susarla @ Feb 24 2009, 02:28 PM) <{POST_SNAPBACK}>
    Can you please try using the java example provided in a previous post?

    http://developer.yahoo.net/forum/index.php?showtopic=283

    This should work for 2 legged oauth with java.

    -- Nagesh

    Thank you! I work it and get results.
    0
  • Hi,

    I've moved this to the OAuth forum. I'll see what I can figure out about your question, maybe someone else from the OAuth forum will have some ideas.

    Tom
    0

Recent Posts

in OAuth General Discussion YDN SDKs