ApiFunction_logout

Page history last edited by jeremy@... 1 wk ago

logout

 



 

Description

 

This method is used to logout a user.

 

 

Input parameters:

 

Name Type Description
api_key string The API key obtained when registering a project with OpenBox.
auth_token string The authentication token for your service to connect to a user's Box account - obtained through the get_auth_token method.

 

 

Output parameters:

 

Name Type Description
status string

If successful, the logout method will return 'logout_ok' as the status.

If logout was not successful, then status field can be:

  • 'not_logged_in' - The user is already no longer logged into Box for your application.
  • 'application_restricted' - You provided an invalid api_key, or the api_key is restricted from calling this function

 

 

REST

 

Request

 

https://www.box.net/api/1.0/rest?action=logout&api_key=3cdu8ivll9t1y6lz2m416xn6xstymzgg&auth_token=d2dqkrr6bae6ckua17osf9o1fhox9ypf

 

 

Response

 

<?xml version='1.0' encoding='UTF-8' ?>
<response>
<status>logout_ok</status>
</response>

SOAP

 

Request

 

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns4="urn:boxnet"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<ns4:logout>
<api_key xsi:type="xsd:string">3cdu8ivll9t1y6lz2m416xn6xstymzgg</api_key>
<sid xsi:type="xsd:string">tuxotd3sqdbao2c7i5a7u457371zlqzd</sid>
</ns4:logout>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

 

Response

 

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns4="urn:boxnet"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<ns4:logoutResponse>
<status xsi:type="xsd:string">logout_ok</status></ns4:logoutResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

 

XML

 

Request

 

<?xml version='1.0' encoding='UTF-8' ?>
<request>
<action>logout</action>
<api_key>3cdu8ivll9t1y6lz2m416xn6xstymzgg</api_key>
<auth_token>d2dqkrr6bae6ckua17osf9o1fhox9ypf</auth_token>
</request>

 

Response

 

<?xml version='1.0' encoding='UTF-8' ?>
<response>
<status>logout_ok</status>
</response>

 


 

Need additional assistance? Please feel free to Contact us