DELETE access tokens response timing out

Hi

I am playing with Javascript and successfully wrote functions to list all tokens and request a new token, but I have problems with deleting a token. Often i not get any response, sometimes token i want to delete is gone from the list, and often the token is still valid after when i refresh token list.

I have also tested it with Hurl.it and very often i get “Request timed out”.

Here is my code: I fill my credentials and token i want to delete in a form:

function removeToken() {
    var xml = new XMLHttpRequest();
	//read in username/password from form
	var username = document.getElementById("myForm").elements[0].value;
	var password = document.getElementById('myForm').elements[1].value;
    var token = document.getElementById('Form2').elements[0].value;
    var url = "https://api.spark.io/v1/access_tokens/";
    xml.open("DELETE", url + token, true);
    xml.setRequestHeader("Authorization", "Basic " + btoa(username + ":" + password))
    xml.onreadystatechange = function (aEvt) { 
        if (xml.readyState == 4) { 
        } 
    }; 
    xml.send()
	alert(xml.responseText);
    listTokens();

I just tried, and was successful, at manually deleting all my tokens using this very method. Where are you located (in the world)? Does this happen to you a lot or just once or twice? It’s possible there was simply some downtime when you tried. Has it happened since?

[Edit] You however cannot delete your latest token apparently. I spoke too soon

[Edit 2] The above is a known issue that is being addressed

Hi. I am located in Stockholm Sweden. Maybe you are right and it was some downtime, i tested one or two days before I post in this forum.

Now it working fine, i get a 200 and ok response,

But last token i issued gives me request timed out. I do not have only one token, i have 4 of them, but last issued do not Delete work on.

Yea, that’s a bug. It’s been logged and will be addressed at some point. Sorry!