+ Start a Discussion

logout using the instance_url rest


is it possible to log out of a session using the rest API? if so how can I log out using this method? please let me know as this has taken me a long time to figure out.



Best Answer chosen by Admin (Salesforce Developers) 

All Answers

Pat PattersonPat Patterson

There is currently no logout facility in the REST API, but we'll be adding it in the Winter '12 release (due real soon now).


I don't have the docs to hand, but it will be based on the IETF draft http://www.ietf.org/id/draft-lodderstedt-oauth-revocation-02.txt - something like


POST /services/oauth2/revoke HTTP/1.1
Host: login.salesforce.com
Content-Type: application/json



I am reliably informed that there will also be a GET/JSONP mechanism.






Note that if the token is an access_token, the session will be terminated.   If the token is a refresh_token, the authorization granted by the user for the application will be terminated.


JSONP is indeed being supported.


Thanks Pat!

Daniel BallingerDaniel Ballinger

Does this exist yet? I couldn't find any documention for it in the REST API Developers Guide.




Search for "revoking oauth tokens" in Help and Training