SessionID - What are best practices for how long is it valid
sackroyd
Registered Users Posts: 5 Beginner grinner
I am writing an iPad app accessing photos from Smugmug.
When I get a SessionID, how long should I count on it being valid?
Or to be more specific - should I login and get a new sessionID every time I interact with smugmug via the Api?
Is there some period of time where I count on it being active?
Example - app starts. The app calls smugmug api to get an album list. App presents user with list of albums. User selects an album, so app wants to download the images. Should I login again, and get a new sessionID to download the images or use the existing one?
Thanks in advance.
steve
When I get a SessionID, how long should I count on it being valid?
Or to be more specific - should I login and get a new sessionID every time I interact with smugmug via the Api?
Is there some period of time where I count on it being active?
Example - app starts. The app calls smugmug api to get an album list. App presents user with list of albums. User selects an album, so app wants to download the images. Should I login again, and get a new sessionID to download the images or use the existing one?
Thanks in advance.
steve
0
Comments
I've read somewhere that the sessionid is valid for 6 hours. In my app when i store the session i store the time it was created. To be safe, i expire it at 5hours 30 mins, and re-login (with the passwordhash method) to update the session id. That seems to work pretty well so far.
Thanks