• Gear
  • Shots
  • Photo Craft
  • Video
  • Wide Angle
  • Support
  • New Stuff
  • More
Support SmugMug APIs, Hacks & Tricks Validating SessionID with method ?

FAQtoid

Ever wanted to create an Avatar? Creating an Avatar!

Searching Dgrin with Google Searching with Google

Dgrin Challenges

Congratulations to the Winner of DSS #128 (Sunrise or Sunset), ShootingStar.

The next Dgrin Challenge DSS #129 (Silhouette Revisited ) is open for entries through May 27th, 2013 at 8:00pm PDT.

As always, we look forward to your participation but please do take a moment to read through the rules before posting your entry.

Past DSS Challenge Winners, DSS Challenge Rules, and other important DSS Challenge information is here.

Need some help with Accessories?

Tutorials

Ever find yourself wondering just how someone managed to create an image using different effects?

Here are three simple tutorials we hope will encourage you to try something new.

The Hot Seat

A lifelong interest in landscape photography has led Eyal Oren to make a study of his adopted hometown of Marblehead, MA. As you can see, his dedication is paying off!

Africa!

Dgrinners Harryb, Pathfinder, and others joined Andy Williams and Marc Muench on Safari in East Africa recently. Here are some awesome threads to check out!

 
Thread Tools Display Modes
Old May-25-2005, 08:48 PM
#1
devbobo is offline devbobo OP
technicolored
devbobo's Avatar
Validating SessionID with method ?
Hey Don,

I am trying to do some cleanup work around SessionID reuse. At moment, I just try to use the previous SessionID (if the user hasn't logged out)...if the SessionID has timed out obviously, I need to either get the user to log in or use the password hash if I have it stored.

My question is, would it be possible to provide a method that can valid whether a SessionID for a particular user is valid ? To save having to put additional error handling in other method calls, and more importantly to prevent making multiple calls which will all fail if the SessionID has timed out.

Cheers,

David
__________________
David Parry
SmugMug API Developer
My Photos
Old May-26-2005, 12:32 PM
#2
jberd126 is offline jberd126
Big grins
jberd126's Avatar
David,

You should be able to use one of the lighter calls and if it returns an error you will know. For example, you could use smugmug.users.getType (or the older smugmug.accounts.getType) and it should return error code 4 (Invalid user) for a stale SessionID.

However, there appears to be a bug (at least with REST calls) where stale SessionIDs incorrectly return error code 18 (invalid API key). I made mention of this last week in a post for smugmug.users.getTree. It appears that it shows up in other calls as well.
http://www.dgrin.com/showthread.php?p=107964#post107964

-J
Tell The World!  

Thread Tools
Display Modes

Posting Rules  
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump