|
2/26/2011 at 3:46 PM
|
I am using C++ and the CURL library. I am able to negotiate OAuth and get an access token. I add the access token to the Headers. Ex: Authorization: OAuth 8gBTGDcFPlJQ3ra2gi6Kw96xspK1wmAPfRMKe2iR I am getting a 500 error code ("ApiException") when I send a profile inquiry. The same inquiry works fine when I paste it in the browser address window. Do I have the right syntax? Is there documentation available? (The Ruby example should be updated). |
|
|
2/27/2011 at 7:23 AM
|
Greetings Pierre, Was this 10 days ago, or more recent? The only logged errors I see for you are on February 17th, where it appears that you were missing the "g" in front of a profile ID in an immediate-family call. I suspect you got that worked out, though, and that whatever problem you're having is more recent but not being logged for some reason...? |
|
|
2/27/2011 at 7:45 AM
|
This is happening yesterday and today (minutes ago). I am trying every permutation under the sun: Authorization: OAuth %s
Authorization: %s
Authorization: OAuth "%s"
Authorization: OAuth token %s
I really appreciate some help, I am gung-ho to get this up & running today :o) |
|
|
2/27/2011 at 8:12 AM
|
Here's the header I get back: HTTP/1.1 500 Internal Server Error
|
|
|
2/27/2011 at 9:26 AM
|
||
|
2/27/2011 at 9:42 AM
|
||
|
2/27/2011 at 10:15 AM
|
Here is the trace log captured by a debugging function: GET /?code=vLs8E1Im7zQLdjcZnJXx HTTP/1.1
https://www.geni.com/oauth/token?client_id=IKPCwc6QmjBg4LbKRLoVzBWf...
curl_debug_func: Trying 208.78.87.80...
curl_debug_func: Connected to www.geni.com (208.78.87.80) port 443 curl_debug_func: CAfile: curl-ca-bundle.crt
curl_debug_func: SSLv2, Client hello (1): curl_debug_func:
curl_debug_func:
curl_debug_func:
curl_debug_func:
curl_debug_func:
curl_debug_func:
curl_debug_func:
curl_debug_func:
curl_debug_func:
curl_debug_func: Server certificate: curl_debug_func: subject: /serialNumber=/lPhimBQlVfNkaJkSEPRisRh-EM7Acws/C=US/O=*.geni.com/OU=GT97122710/OU=See www.rapidssl.com/resources/cps (c)10/OU=Domain Control Validated - RapidSSL(R)/CN=*.geni.com curl_debug_func: start date: 2010-08-25 03:58:32 GMT curl_debug_func: expire date: 2011-08-28 19:35:09 GMT curl_debug_func: subjectAltName: www.geni.com matched curl_debug_func: issuer: /C=US/O=Equifax/OU=Equifax Secure Certificate Authority curl_debug_func: SSL certificate verify ok. curl_debug_func: GET /oauth/token?client_id=IKPCwc6QmjBg4LbKRLoVzBWfBWlNH4T9jTDSZ9N8&client_secret=***&code=vLs8E1Im7zQLdjcZnJXx&redirect_uri=http://127.0.0.1:55555 HTTP/1.1
curl_debug_func: HTTP/1.1 200 OK HTTP/1.1 200 OK
Server: nginx/0.7.65
Date: Sun, 27 Feb 2011 18:08:30 GMT
Content-Type: application/json; charset=utf-8
Connection: keep-alive
Status: 200 OK
ETag: "c9ee41a7528e72ceb78f5f3891d8fe44"
X-Runtime: 58
Content-Length: 53
Set-Cookie: ref=www.progenygenealogy.com; path=/; expires=Mon, 28-Feb-2011 18:08:30 GMT
Set-Cookie: gsession=BAh7CjoLbG9jYWxlIgplbi1VUzoQc2F2ZV9sb2NhbGVGOg9zZXNzaW9uX2lkIiUxZWY1MDYyNWRkOWQ4OWUxMzM5ZWQ1ZGU3N2RmOGZmNiINcmVmX3R5cGUiDG9yZ2FuaWM6FGdlbmlfc2Vzc2lvbl9pZCIlOGVmYzdiMjQyMWMxNzI2ZjA2YmUwM2NmNjYyMDg1MGI%3D--20923a7d044a973aa53de2e2baaf3aadf568a9cd; path=/; HttpOnly
Cache-Control: private, max-age=0, must-revalidate curl_debug_func: access_token=I2CJLCgd44FFRZdaCm8Fbev0GOVdi0Xn0Dw6tAcE
getAccessToken ret = 200
curl_debug_func: Trying 208.78.87.80...
curl_debug_func: Connected to www.geni.com (208.78.87.80) port 80 curl_debug_func: GET /api/profile/immediate-family.xml HTTP/1.1
curl_debug_func: HTTP/1.1 500 Internal Server Error HTTP/1.1 500 Internal Server Error
Server: nginx/0.7.65
Date: Sun, 27 Feb 2011 18:08:31 GMT
Content-Type: application/xml; charset=utf-8
Connection: keep-alive
Status: 500 Internal Server Error
X-API-Rate-Limit: 40
X-API-Rate-Window: 10
Content-Length: 84
Set-Cookie: gsession=BAh7CDoPc2Vzc2lvbl9pZCIlZDQ3MWY5OGVhNzc5ZmM1YmY0NGNlM2Q2ZGM5MmQ2ZDAiDXJlZl90eXBlIgxvcmdhbmljOhRnZW5pX3Nlc3Npb25faWQiJTE1ZDFmNGJiM2QzY2RjZDcyYTVhZDBkNTVhYmEzMzgz--1603503331e51edd11ea58b2f3afacb83509dce4; path=/; HttpOnly
X-API-Rate-Remaining: 40
Cache-Control: no-cache curl_debug_func: <?xml version="1.0" encoding="UTF-8"?>
curl_debug_func: Connection #1 to host www.geni.com left intact |
|
|
2/27/2011 at 8:32 PM
|
||
|
2/28/2011 at 7:18 AM
|
No problem - this is a full-time job for me, I'm available seven days a week to work on the GENI version of my app. So, how do I formulate the "Authorization" part of the header? Are there any written specifications available? Am I doing something incorrect, or is the "ApiException" coming from the GENI code? Sure appreciate the help. Here is a sample of the charts I will be creating directly from GENI data: http://progenygenealogy.com/Products/FamilyTreeCharts/SampleCharts.... |
|
|
2/28/2011 at 9:34 AM
|
Post deleted by Scott Steadman on Feb 28, 2011 at 9:37 AM |
|
|
2/28/2011 at 9:37 AM
|
Post deleted by Scott Steadman on Feb 28, 2011 at 9:38 AM |
|
|
2/28/2011 at 9:39 AM
|
I think you're using an OAuth1-style header to make the call. Try this url: https://www.geni.com/api/profile/immediate-family.xml?access_token=... code returned from token call) |
|
|
2/28/2011 at 11:28 AM
|
That did the trick. The access token is not delimited by quotes: https://www.geni.com/api/profile/immediate-family.xml?access_token=... I don't know Ruby, but I examined the example here (https://github.com/intridea/oauth2/commit/607af1ca78fa20b796de6260a...) and assumed that this meant we had to add the Authorization code to the header: headers = headers.merge 'Authorization' => "OAuth #{@token}" Thanks very much. BTW accurate, up-to-date documentation is really appreciated. We will read it and ask fewer dumb questions. |
|
|
3/1/2011 at 11:32 AM
|
Post deleted by Scott Steadman on Mar 1, 2011 at 11:36 AM |
|
|
3/1/2011 at 11:37 AM
|
||
|
6/28/2011 at 3:14 PM
|
BUMP! Scott Steadman - Itried the Authorization OAuth oauth_signature_method=PLAINTEXT&oauth_token=xxx
{"error":{"type":"ApiException","message":"Bad Request"}} Could you check up what kind of header Geni accept for OAuth Authorization? I try to avoid having to unpack and repack the url just add the oauth_token parameter. Could you also check what kind of parameters or headers Geni require to get to this page by replying with a 302 Location response to the access_token message: http://i632.photobucket.com/albums/uu41/bpbrox/AllowedRequest.png |
|
|
6/29/2011 at 5:54 AM
|
||
|
6/29/2011 at 10:51 AM
|
||
|
6/29/2011 at 1:42 PM
|
No need for PM. It's http://sandbox.geni.com/ You'll have to create an account there it's not linked with production. |