Logout not working - what am I doing wrong

jfriendjfriend 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.
http://api.smugmug.com/services/api/rest/1.2.2/?method=smugmug.login.anonymously&APIKey=m3fjH1x4QjX6N10RsaVUeWr0dgg2oQoZ
And 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=b067e09130175cddfde4bc2536e84508
When 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
HomepagePopular
JFriend's javascript customizationsSecrets for getting fast answers on Dgrin
Always include a link to your site when posting a question

Comments

  • devbobodevbobo Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
    edited December 1, 2010
    Since anonymous sessions are well..anonymous, there is really no need to call logout as you aren't exposing any private user data.

    Cheers,

    David
    David Parry
    SmugMug API Developer
    My Photos
  • jfriendjfriend Registered Users Posts: 8,097 Major grins
    edited December 1, 2010
    devbobo wrote: »
    Since anonymous sessions are well..anonymous, there is really no need to call logout as you aren't exposing any private user data.

    Cheers,

    David
    OK, I thought you'd want to retire the session when we were done just for your own efficiency. I guess I can stop doing a logout. So is logout specifically not supported with anonymous logins?
    --John
    HomepagePopular
    JFriend's javascript customizationsSecrets for getting fast answers on Dgrin
    Always include a link to your site when posting a question
Sign In or Register to comment.