How to concat the signature elements ?

30 views
Skip to first unread message

renoke

unread,
Apr 16, 2009, 9:25:02 AM4/16/09
to Dipity Developer API Discussions
Hi everybody,

I'm not sur how to compute the signature value. I do something wrong
but I don't know what exactly. Here is my code for creating a timeline
(it's in ruby, but it's readable by non rubyist I believe) :

signature = MD5.digest(mysecretcodepublic=1title=test)

RestClient.post 'http://api.dipity.com/rest/timelines', :key
=>'mykey', :sig=>signature

It's seems that I don't append correctly the signature elements, does
I ?

Cheers,

Renoke


Renoke

unread,
Apr 30, 2009, 6:50:05 AM4/30/09
to Dipity Developer API Discussions
I got it finally. I forgot two things:

1) title et public parameters is the body of the post query
2) 'text/xml' accept header

So the post body is 'key=mykey&sig=signature&public=1&title=test'

and signature is MD5.digest(mysecretcodepublic1ititletest)

Renaud
Reply all
Reply to author
Forward
0 new messages