Logout via REST gives 'Invalid API Key' error

jberd126jberd126 Registered Users Posts: 36 Big grins
When I try to logout from a previously logged in session via REST, I get an 'Invalid API Key' error.

Request:
http:// api.smugmug.com/hack/rest/?method=smugmug.logout&SessionID=XXXX

Response:
< rsp stat="fail"> 
< err code="18" msg="invalid API key" />
< /rsp>
According to the documenation only the Login commands should require the API key.
-J

Comments

  • Brian EkeyBrian Ekey Registered Users Posts: 2 Beginner grinner
    edited May 18, 2005
    I am also getting the same error. This call (with a valid sid<SID>):

    api.smugmug.com/hack/rest/?method=smugmug.logout&&SessionID=sid

    Produces this response:
    < ?xml version="1.0" encoding="utf-8" ?>< rsp stat="fail">
    	 < err code="18" msg="invalid API key" />< /rsp>
    

    I also tried passing the APIkey and the SessionID, and I also tried passing the APIkey instead of the SessionID. Nothing seems to work. It doesn't really effect my script, but I hate to leave all these open sessions behind. Any sugestions?

    Thanks,
    -Brian
  • jberd126jberd126 Registered Users Posts: 36 Big grins
    edited May 18, 2005
    I think this was fixed with the new Beta API release but I haven't tried it yet:
    http://www.dgrin.com/showthread.php?t=11191
    - fixed bug in logout, should work properly now
    
    You need to call beta.mg to access the Beta APIs though: http://api.smugmug.com/hack/rest/beta.mg

    -J
  • {JT}{JT} Registered Users Posts: 1,016 Major grins
    edited May 18, 2005
    Confirmed - it is fixed if you use the beta.
Sign In or Register to comment.