This method is used in the authorization process. You should call this method after the user has authorized themself on box.net site. Pass the ticket that you get when calling the get_ticket method. On a successful result, this method will return 'get_auth_token_ok' as the status, 'auth_token' to use in other method calls, and a 'user' struct which describes the user.
www.box.net/api/1.0/rest?action=get_auth_token&api_key=rrc1d3ntb53tt6b2vhail6rdtrsxov3v&ticket=udd863k39gn9mioc6ym2c6erbqm8qfsh
<?xml version='1.0' encoding='UTF-8'?>
<response>
<status>get_auth_token_ok</status>
<auth_token>9byo5bg8d2o3otp0voji0ej0v49bqcmo</auth_token>
<user>
<login>stas@itscript.com</login>
<email>stas@itscript.com</email>
<access_id>453</access_id>
<user_id>453</user_id>
<space_amount>2147483648</space_amount>
<space_used>1024</space_used>
</user>
</response>
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tns="urn:boxnet"
xmlns:types="urn:boxnet/encodedTypes"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>
<soap:Body soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<tns:get_auth_token>
<api_key xsi:type="xsd:string">rrc1d3n4b53tt6b2vh1il6tdtrsxov3v</api_key>
<ticket xsi:type="xsd:string">bxquuv025arztljze2n438md9zef95e8</ticket>
</tns:get_auth_token>
</soap:Body>
</soap:Envelope>
<?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:get_auth_tokenResponse>
<status xsi:type="xsd:string">get_auth_token_ok</status>
<auth_token xsi:type="xsd:string">819f55922d47097715b723218176a3a5</auth_token>
<user xsi:type="ns4:SOAPUser">
<login xsi:type="xsd:string">login@email.com</login>
<email xsi:type="xsd:string">login@email.com</email>
<access_id xsi:type="xsd:int">453</access_id>
<user_id xsi:type="xsd:int">453</user_id>
<space_amount xsi:type="xsd:long">2147483648</space_amount>
<space_used xsi:type="xsd:long">49927894</space_used>
</user>
</ns4:get_auth_tokenResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
<?xml version='1.0' encoding='UTF-8' ?>
<request>
<action>get_auth_token</action>
<api_key>rrc1d3ntb53tt6b2vhail6rdtrsxov3v</api_key>
<ticket>udd863k39gn9mioc6ym2c6erbqm8qfsh</ticket>
</request>
<?xml version='1.0' encoding='UTF-8'?>
<response>
<status>get_auth_token_ok</status>
<auth_token>9byo5bg8d2o3otp0voji0ej0v49bqcmo</auth_token>
<user>
<login>stas@itscript.com</login>
<email>stas@itscript.com</email>
<access_id>453</access_id>
<user_id>453</user_id>
<space_amount>2147483648</space_amount>
<space_used>1024</space_used>
</user>
</response>
Need additional assistance? Please feel free to Contact us
Page Information
|
Wiki Information |
![]() Update to PBwiki 2.0 An entirely new PBwiki experience, including folders and easier editing. |