Legend

Forum

Unread topics or posts

Topic

Unread posts

Locked

Announcement

Forums > Developers

Invalid Signature



AuthorMessage
isaaclimdc

Posted: May 01, 2011
Score: 0



I use the provided Objective-C method to create the md5 hash of the user's inputted email and the app token of my app:

char *cStr = [[NSString stringWithFormat:@"%@%@",email,myAppToken] UTF8String];
unsigned char result[CC_MD5_DIGEST_LENGTH];
CC_MD5(cStr, strlen(cStr), result);
NSString *sig = [NSString stringWithFormat: @"%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X", result[0], result[1], result[2], result[3], result[4], result[5], result[6], result[7], result[8], result[9], result[10], result[11], result[12], result[13], result[14], result[15]];

but the request response is "invalid signature". I can't seem to get past this! Any help?
Toodledo

Administrator
Posted: May 02, 2011
Score: 0



Its hard to say where the bug in your code is. On our API docs page there is a form where you can have the website generate the signature for you, and you can then compare with what the app is generating.
fahad

Posted: May 16, 2011
Score: 0



I'm having the same problem. I've even compared the signature and it's generated exactly as your online form generates however I'm continuously getting this no matter what I do.
fahad

Posted: May 16, 2011
Score: 0



Turns out you have to return a lower cased string back to the server. The example doesn't show this and the documentation doesn't mention this. More woes to our experience with poor documentation.
Toodledo

Administrator
Posted: May 17, 2011
Score: 0



I have updated the API so that key and signature validations are case insensitive. So, this wont be a problem anymore.


To participate in these forums, you must be signed in.



Toodledo Forums > Developers

Contact Us | Blog | API | Help | Forums Privacy | Terms | Copyright © 2006-2012