Confused on REST API (for an iOS application) for a 502 (bad gateway) from signed start.

90 views
Skip to first unread message

Giacomo Tufano

unread,
Feb 7, 2012, 12:06:53 PM2/7/12
to karo...@googlegroups.com
Background: I have an iOS application tied to the Nabaztags in which I'm trying to implement some karotz support. I read the documentation and I understand that I had to use the REST API. :)

I religiously followed the registration process <http://dev.karotz.com/dev/register_app.html>; made a descriptor.xml stating that this is an external application and with a callback URI to call (well, the second one, the first one didn't have callback url).

Server code in place to accept a call to myURL?interactiveid=xxxx as in documentation and to return an InstallID. Whatever it is. I return a fixed string (say '123ABC').
Executing the python code in <http://dev.karotz.com/api/signed.html#Start-Application-from-installID> to make a "signed start" I get nothing back.
I used curl to make the last call in code and I get (verbose mode, somewhat masked I don't know if it is sensible):
* Trying 176.34.249.101... connected
* Connected to api.karotz.com (176.34.249.101) port 80 (#0)
> GET /api/karotz/start?apikey=df566171-ca6a-48fd-bf79-xxxxxxx&installid=123ABC&once=38775111266&timestamp=1328633920&signature=nO3jCugSdj7stOExxxxd0%3D HTTP/1.1
> User-Agent: curl/7.21.4 (universal-apple-darwin11.0) libcurl/7.21.4 OpenSSL/0.9.8r zlib/1.2.5
> Host: api.karotz.com
> Accept: */*
>
< HTTP/1.1 502 BAD_GATEWAY
< Content-Length: 0
< Connection: keep-alive
<
* Connection #0 to host api.karotz.com left intact
* Closing connection #0

Now 502 is not the kind of error I expect… it seems something really wrong server-side. In any case, I don't have any call to the callback URL.

Is that a know problem? There is something basic that I did wrong? Should I install something on the Karotz before (I cannot imagine why but, you know)...

Thank you in advance,
gt

PS: I can understand French (cannot write it without making people laugh), feel free to answer in french if that is easier for you. :)

Giacomo Tufano

unread,
Feb 7, 2012, 12:23:17 PM2/7/12
to karo...@googlegroups.com
I found that the App on the dashboard had a "submit!" button not present on tutorial page… and I clicked it. Without any warning, now the status is "SUBMITED" (!). I'm wondering what that means and if that have any connection with my errors below (or if I made something really wrong, like ask for publishing it).
Meanwhile I read also the wiki pages (both french and english) but didn't find anything using rest api and signed start. Nor any example of "InstallID"'s.
Again, thank you for any help.
Regards,
gt

KarMen

unread,
Feb 7, 2012, 12:42:05 PM2/7/12
to karo...@googlegroups.com
Hi Giacomo,

Sorry, i cannot help you as i'm just using javascript api.

Only info on wiki about REST api was written because i asked for it:

It's only a sample for beginners. 

Don't hesitate to share your discoveries (in French or English) on wiki.

Regards,

Xavier

Giacomo Tufano

unread,
Feb 8, 2012, 8:43:07 AM2/8/12
to karo...@googlegroups.com
Thank you Xavier. :)

For the records: it seems that the callback is not called to get the Install-ID for a "signed start" (at least with the path/instructions stated in the web site).
I managed to have an Install-ID (that works with python sample code) adding <parameter key="showInstallUuid" value="true"/>
that makes the installID showing on the installation page. The solution is suboptimal, but it's a reasonable workaround.

Regards,
gt

PS: yes, I'll add what I find about the REST API to the wiki while I find it…
Reply all
Reply to author
Forward
0 new messages