token lifespan

token lifespan

Postby wgmaker » Sat Sep 20, 2014 2:03 am

The API20140530 wiki mentions 'Obtain the token for this session'. How do you define 'session' here? What is the lifespan of the obtained token? Is there a timespan limitation? Or other limitations of it validity?
The client I am developing might require a separate 'run' to obtain the token prior to the actual data collection. Is that feasible?
wgmaker
 
Posts: 4
Joined: Thu Sep 18, 2014 1:32 pm

Re: token lifespan

Postby rkulagow » Sat Sep 20, 2014 7:51 am

I've updated the docs on the wiki and added this to the "Get a Token" portion:

A token is considered invalid if any of the following occurs

24 hours elapse since the token was first granted
A new token is requested
rkulagow
SD Staff
 
Posts: 914
Joined: Tue Aug 14, 2007 3:15 pm

Re: token lifespan

Postby kgroeneveld » Fri Oct 31, 2014 5:25 pm

So what happens if a user has two applications setup for the same account and they both try to update around the same time? When the second requests a token wouldn't the first applications token become invalid which could cause problems if it isn't finished yet?
kgroeneveld
 
Posts: 20
Joined: Fri Oct 31, 2014 4:14 pm

Re: token lifespan

Postby rkulagow » Fri Oct 31, 2014 6:14 pm

Correct.

For now the server-side code assumes that there's only a single application using the token. That may change in the next API, but because API 20140530 is already being used by a number of applications I'm not going to change that at this time.
rkulagow
SD Staff
 
Posts: 914
Joined: Tue Aug 14, 2007 3:15 pm


Return to Developer

Who is online

Users browsing this forum: No registered users and 9 guests