CURL ERROR |
![]() ![]() |
CURL ERROR |
| Brian |
Nov 6 2008, 02:50 PM
Post
#1
|
|
Group: Members Posts: 4 |
The documentation for the Yahoo GUID (http://developer.yahoo.com/social/rest_api_guide/web-services-guids.html) says that a request for http://social.yahooapis.com/v1/me/guid will return the GUID of the person using the application. That isn't working for me, I just get a 404 back.
I am able to access the contacts and presence APIs. The /v1/me/guid API is the only one that fails for me. Any ideas about what I'm doing wrong? Here's the HTTP request I'm sending: GET /v1/me/guid?oauth_nonce=9400822300302665&oauth_timestamp=1226011627&oauth_consumer_key=dj0yJmk9MVRreVc0RkRpcks2JmQ9WVdrOVZGUnhNWE5STldVbWNHbzlOa mc0TVRFek56WXgmcz1jb25zdW1lcnNlY3JldCZ4PTQw&oauth_signature_method=HMAC-SHA1&oauth_version=1.0&oauth_token=A%3D.XuqK3Hajix1T2V4nEwaruC7fpfHuMPCVhE8Ap126HR6oLUdsddJVDroo.psyn3IPQodWjY41MWoLv f4Yyr6nrV6aLMe1srGfeNRX7cErlQi4MdlTTSUcjRbOPfxnNa92fPSHU.u1folqZxMu63RhEPQVV8Y.l H A_ndliweGE06xajB7f0oyHSqbopULZJZxsbJlG9h4I7B33MRGiIYzblpstJWozxpLNc65BItyuWncL2K H bAl_aglZA5vL86OVyZTzX3gVHDpQnyNRdhaEwgop7uD_G7b9GvEhUDM3d3XyYvFJG_um36piRjQpXkFu X IebHYqW7jE.2jfeBxwTj6XG8N3YwN4H3l9dMjKTDCHxnTXRJPwdgmsOXZKvLGs4uWnY5KdGn09Y8XY7e w 5YTygQh6wcpdu36gbbP.qk_xoCW37GOMW0JFhhRQwMmYo5kFc2W7hV62cSzu.9R2F9SuqS.4.A8TBfsu 7 8CmZ4HV_w8pt4ZluU_.GYdSvoaRtoeJbUNcgl5_ofRPz6jnUOvbZ0okWzLl5MYa27rdxjvaTRjbXvApq B YqqZyJdYMvxFfW9RuTKAcuLdwTG0Jk8t8sQAnwxv0dWcm3kFPXJz3XKfsr.hP9myfzvWLV6tSOM7M5CY . A600Uklwibs0zWRxtp85etYoxqf90aMnHUZRzaHiM_ih68J4WMnSAWw7Q--&oauth_signature=f7E1sClgphkt47vYzXRqG6LAgPU%3D HTTP/1.1 Accept-Encoding: identity Host: social.yahooapis.com Connection: close Accept: * User-agent: Python-urllib/2.4 Here's the response: HTTP/1.1 404 Not Found Date: Thu, 06 Nov 2008 22:47:07 GMT Connection: close Server: YTS/1.17.9 Cache-Control: no-store Content-Type: text/html Content-Language: en Content-Length: 176 <HEAD><TITLE>Not Found</TITLE></HEAD> <BODY BGCOLOR="white" FGCOLOR="black"> <FONT FACE="Helvetica,Arial"><B> </B></FONT> <!-- default "Not Found" response (404) --> </BODY> . |
|
|
|
| Jonathan LeBlanc |
Nov 6 2008, 03:44 PM
Post
#2
|
|
Group: Yahoos Posts: 942 |
Hi Brian,
I'm running the request using the PHP SDK and don't seem to be running into any problems. There are two ways I have in my test to capture the guid: 1. Using the URL as a request: CODE 2. Accessing the GUID directly with the sessioned user class: CODE If those don't help with the issue if you could provide me with the code block you're using to make the request I'll take a look. Jonathan LeBlanc Senior Software Engineer Yahoo! Developer Network The documentation for the Yahoo GUID (http://developer.yahoo.com/social/rest_api_guide/web-services-guids.html) says that a request for http://social.yahooapis.com/v1/me/guid will return the GUID of the person using the application. That isn't working for me, I just get a 404 back. |
|
|
|
| Brian |
Nov 6 2008, 04:26 PM
Post
#3
|
|
Group: Members Posts: 4 |
Thanks for pointing me towards how to get this working with the PHP SDK, a working example in any language helps a lot, I was able to find the problem.
The problem is that the /v1/me/guid URL does not like OAuth parameters in the query string, it only accepts them in the Authorization header. The other API endpoints accept query parameters. Breaking it down: request token and access token endpoints: query string: OK authorization header: NO presence/contacts/profiles/updates: query string: OK authorization header: OK guid: query string: NO authorization header: OK This makes things a little tricky: there is no single place I can put OAuth parameters that all of Yahoo's endpoints will accept, instead I have to keep track of which endpoints are special. |
|
|
|
| Brian |
Nov 6 2008, 04:43 PM
Post
#4
|
|
Group: Members Posts: 4 |
Oddly enough, the doc claims that query parameters should be accepted: http://developer.yahoo.com/oauth/guide/oau...ke-request.html
Any chance of getting the guid endpoint fixed to accept query parameters? I'm working on integrating Yahoo's OAuth APIs with Shindig so that opensocial gadgets can use the APIs. That's going to be tricky if there's no consistent place to send OAuth parameters. |
|
|
|
| venkat c |
Nov 20 2008, 02:42 AM
Post
#5
|
|
Group: Members Posts: 3 |
Oddly enough, the doc claims that query parameters should be accepted: http://developer.yahoo.com/oauth/guide/oau...ke-request.html Any update on this. Does any one have a C#/Java work around for this. |
|
|
|
| venkat c |
Nov 20 2008, 02:53 AM
Post
#6
|
|
Group: Members Posts: 3 |
|
|
|
|
| EusdenS |
Dec 2 2008, 10:06 PM
Post
#7
|
|
Group: Members Posts: 3 |
Correct me if I am wrong. After we get the access token, does the user guid get stored in Session? How do I access it without the SDK? The user guid is not stored in the session. It's returned using the xoauth_yahoo_guid parameter from the access token call. This is Yahoo's own extension and you would need to customize your oauth workflow to support adding it to your session. |
|
|
|
| EusdenS |
Dec 2 2008, 10:08 PM
Post
#8
|
|
Group: Members Posts: 3 |
Thanks for pointing me towards how to get this working with the PHP SDK, a working example in any language helps a lot, I was able to find the problem. BTW, thank you Brian for your work on this. With your analysis I finally got a working workflow despite Yahoo's broken implementation. |
|
|
|
| MichelleW |
Dec 3 2008, 06:40 PM
Post
#9
|
|
Group: Members Posts: 4 |
The user guid is not stored in the session. It's returned using the xoauth_yahoo_guid parameter from the access token call. This is Yahoo's own extension and you would need to customize your oauth workflow to support adding it to your session. Thanks karthur26! This saved me all the trouble I was having with the me/guid URL. |
|
|
|
| Hacker2007 |
Jan 9 2009, 11:39 AM
Post
#10
|
|
Group: Yahoos Posts: 2 |
Hi Brian,
Can you please try passing the parameters in HTTP Authorization header and see if that works for you? We recently added support for Authorization header for request token and access token endpoints. Thanks, Usha Yahoo Membership Team |
|
|
|
![]() ![]() |