ForumsDevelopersInvalid key
Invalid key
Author | Message |
---|---|
Benjamin Leclerc |
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 Founder |
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 |
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 Founder |
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 |
Ticket created
|
You cannot reply yet
U Back to topic home
R Post a reply
To participate in these forums, you must be signed in.