Cant Get Frub - signature failed

62 views
Skip to first unread message

A Meidan

unread,
Feb 28, 2012, 11:37:19 AM2/28/12
to Remember The Milk API
Hi,

I'm trying to get a frub, and get an error stating "Invalid
Signature" .
This is my java code for generating the MD5:

String strToDigest = sharedSecret+"api_key"+API_KEY;
MessageDigest md5 = MessageDigest.getInstance("MD5");

byte[] msgToDigest = strToDigest.getBytes("UTF-8");
byte[] sigBytes = md5.digest(msgToDigest);

api_sig = new BigInteger(1,sigBytes).toString(16);

Please Help.
Thanks.

Jason Emerick

unread,
Feb 28, 2012, 8:23:48 PM2/28/12
to remembert...@googlegroups.com
The string to digest should also include the method (and format if you are using that parameter).

for example: SHAREDSECRETapi_keyAPIKEYformatjsonmethodrtm.auth.getFrob

I built a tool called milkapi.com to help with using the RTM API which may help you as well.


-- 
Jason Emerick

A Meidan

unread,
Feb 29, 2012, 1:57:16 PM2/29/12
to Remember The Milk API
Thanks,
I'm doing it for educational purpose, so I'm cool with getting my
hands dirty. :)

Another question, if you don't mind,
When do i need to do the authentication sequence? each request? only
when logging in?

Thanks.

Jason Emerick

unread,
Feb 29, 2012, 11:47:52 PM2/29/12
to remembert...@googlegroups.com
Once you acquire the auth token via the authentication sequence, you just use the auth token for all further requests. 

-- 
Jason Emerick

Reply all
Reply to author
Forward
0 new messages