Options

BUG: Different Behavior with Login Approaches

DrMillerKCDrMillerKC Registered Users Posts: 24 Big grins
With API 1.2.2, I can successfully log in with either smugmug.login.withPassword or smugmug.login.withHash and get a sessionID. However, when I first log in with the Hash approach and then try to get.Albums (and get.Categories if I remember), even when I send along my API key, even though it is not specified as required (only the sessionID is required according to the docs), the status is "fail" and the reason is "Invalid API key". So, in order to get things to work the first time around, I have to send my email address and password along instead of a userID and Hash. I feel it should not matter which method is chosen first and that's why it is a bug.

Now, to help you find this bug, once I have successfully logged on via email/password and get the new sessionID and then get the Albums with that new sessionID, THEN the next time I log in, I can switch to the Hash login method, get a new sessionID, and then get.Albums works without the Invalid API key message!

It seems a successful login via email/password sets some flag on the server that does not get set when the userID/hash method is used.
Sign In or Register to comment.