View Full Version : Logout via REST gives 'Invalid API Key' error
jberd126
May-04-2005, 08:36 AM
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
Brian Ekey
May-18-2005, 06:10 AM
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
jberd126
May-18-2005, 07:30 AM
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}
May-18-2005, 03:31 PM
Confirmed - it is fixed if you use the beta.
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.