Legend

Forum

Unread topics or posts

Topic

Unread posts

Locked

Announcement

Forums > Developers

Invalid key



AuthorMessage
Benjamin Leclerc

Posted: Nov 20, 2012
Score: 0



Hi,

Since a couple of weeks (months ?), I sometimes receive "Invalid key" when using the API.

I checked the logs of my app, and I use the same key, so for example 5 times with the key work then with the same key I suddenly receive "Invalid key".

Example:

The token generated only 2 hours ago.

Nov 20, 2012 12:03:48 PM
FINE: http://api.toodledo.com/2/account/get.php?key=abc&f=xml
Nov 20, 2012 12:03:48 PM
FINE: <?xml version="1.0" encoding="UTF-8"?><account><userid>td4ad087a11f87d</userid>
Nov 20, 2012 12:03:48 PM
FINE: https://api.toodledo.com/2/contexts/get.php?key=abc&f=xml
Nov 20, 2012 12:03:48 PM
FINE: <?xml version="1.0" encoding="UTF-8"?><contexts></contexts>
Nov 20, 2012 12:03:49 PM
FINE: https://api.toodledo.com/2/folders/get.php?key=abc&f=xml
Nov 20, 2012 12:03:49 PM
FINE: <error id='2'>Invalid key</error>

I replaced the key by abc, but I checked the key, and it was three times the exact same key.
You can see that get account worked, then get contexts worked, then folders failed, all with the same key.

This happens once in a while.

Could you confirm that the expiration of a token is 4 hours ?
I even ask a new token 15 minutes before the expiration date to be sure that it doesn't happen during the sync.

What could be the problem ?

Thanks,

Ben
Jake

Toodledo Admin
Posted: Nov 20, 2012
Score: 0



I don't know what is happening, but your code should be written in such a way that if you get an invalid key error, you just generate a new key and continue syncing. I think that will solve your problem.
Benjamin Leclerc

Posted: Nov 26, 2012
Score: 0



I now generate a new key when it happens, however, the problem happens quite often with some users, and then I receive errors saying that I requested to many tokens.

I had a look at the logs again and it's exactly the same.

With the exact same key, and a token which has been refreshed less than 4 hours ago, some requests fails with "Invalid key".

Could you have a look ?
Jake

Toodledo Admin
Posted: Nov 26, 2012
Score: 0



I cannot find anything that would cause this besides sending the wrong key, or one that has expired (4 hours). If you could please create a support ticket and attach some unaltered logs, that may give us a clue.
Benjamin Leclerc

Posted: Nov 27, 2012
Score: 0



Ticket created
You cannot reply yet


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



Toodledo Forums > Developers

Contact Us | Blog | API | Jobs | Press | Documentation | Forums Privacy | Terms | Copyright © 2004-2014