Logout not working - what am I doing wrong
jfriend
Registered Users Posts: 8,097 Major grins
I can't seem to get smugmug.logout to work. It always returns "invalid session".
To remove any issues with the app I'm working on from the equation, I distilled it down to this simple sequence which can be entered in a browser. Obviously, if you're repeating the test, you have to substitute the sessionID returned from the first response in to the second URL.
To remove any issues with the app I'm working on from the equation, I distilled it down to this simple sequence which can be entered in a browser. Obviously, if you're repeating the test, you have to substitute the sessionID returned from the first response in to the second URL.
http://api.smugmug.com/services/api/rest/1.2.2/?method=smugmug.login.anonymously&APIKey=m3fjH1x4QjX6N10RsaVUeWr0dgg2oQoZAnd that gives me this response:
<rsp stat="ok"> <method>smugmug.login.anonymously</method> <Login> <Session id="b067e09130175cddfde4bc2536e84508"/> </Login> </rsp>From which I construct this URL:
http://api.smugmug.com/services/api/rest/1.2.2/?method=smugmug.logout&SessionID=b067e09130175cddfde4bc2536e84508When I execute the logout, I get:
<rsp stat="fail"> <method>smugmug.logout</method> <err code="3" msg="invalid session"/> </rsp>I know the sessionID is good because I can do smugmug.images.get using it. So, what am I doing wrong that makes it so smugmug.logout doesn't work? In my app, I'm actually using JSON, but this was simpler to illustrate and shows the same issue.
--John
Homepage • Popular
JFriend's javascript customizations • Secrets for getting fast answers on Dgrin
Always include a link to your site when posting a question
Homepage • Popular
JFriend's javascript customizations • Secrets for getting fast answers on Dgrin
Always include a link to your site when posting a question
0
Comments
Cheers,
David
SmugMug API Developer
My Photos
Homepage • Popular
JFriend's javascript customizations • Secrets for getting fast answers on Dgrin
Always include a link to your site when posting a question