Error removing token

Does the spark server allocate a new token each time you login via the web IDE or terminal?

Its just I tried to manually delete it from the server and got this message:

“error removing token: Error: socket hang up”

Am I best just logging out as normal and ignoring this option to delete the token as an extra safety measure?

I believe the Web IDE and Spark Cli both have their own access token which does not change till 90 days expiry.

You are doing it via spark cli?

Removing it is for extra security measure during spark cloud logout. :wink:

Hi, yes I'm doing it via spark-cli.

I've just ran this command:

curl https://api.spark.io/v1/access_tokens -u email:password

It appears that the web IDE, spark-cli, and the iPhone app (tinker) have their own token. After running the command I appeared to have been issued 10 tokens between all 3 clients.

Ah that’s weird. There should be some label for the access tokens like Web IDE or Spark Cli.

Which is the one generating multiple access tokens?

You can remove them with: http://docs.spark.io/api/#authentication-deleting-an-access-token

Yes, here they are:

[
{
"token": "69067_______________________76807f2e",
"expires_at": "2014-10-25T11:31:37.971Z",
"client": "spark"
},
{
"token": "4d6f0e1_______________________508ef403",
"expires_at": "2014-10-25T13:24:48.949Z",
"client": "user"
},
{
"token": "c593_______________________78df5117",
"expires_at": "2014-10-25T13:24:49.031Z",
"client": "spark-ide"
},
{
"token": "9a9_______________________91bea98b7",
"expires_at": "2014-10-26T16:32:38.645Z",
"client": "spark-cli"
},
{
"token": "4b1_______________________a427c8eabe",
"expires_at": "2014-10-27T14:51:03.342Z",
"client": "spark-cli"
},
{
"token": "1c16_______________________b586487b2",
"expires_at": "2014-11-14T13:53:05.220Z",
"client": "spark-cli"
},
{
"token": "a2a_______________________5850189cc271",
"expires_at": "2014-11-14T13:56:36.277Z",
"client": "spark-cli"
},
{
"token": "12b9f_______________________426bf61",
"expires_at": "2014-11-14T14:36:47.044Z",
"client": "spark-cli"
},
{
"token": "6a3b_______________________3a47a8efa",
"expires_at": "2014-11-14T14:46:28.237Z",
"client": "spark-cli"
},
{
"token": "58d______________________________e8c5",
"expires_at": "2014-11-14T14:59:52.163Z",
"client": "spark-cli"
}

Oh… So spark-cli messed it up?

Just wondering, did you login and out the spark-cli very often? :smiley:

Only yesterday I started doing it as I have been just quitting stuff rather than logging off. Hence this thread as I got an error when trying to delete the access token from spark-cli.

Am I best just staying logged in and delete the existing tokens from the command prompt?

Thanks

You can probably delete all the spark-cli access tokens and re-login again with spark cloud login

Once that is done, the account will remain logged in unless you perform spark cloud logout. :wink: