ApiFunction_get_ticket

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

get_ticket

 



 

Description

 

This method is used in the authentication process. The ticket obtained from this method is used to generate an authentication page for the user to login.

 

 

Input parameters:

 

Name Type Description
api_key string The API key obtained when registering a project with OpenBox.

 

 

Output parameters:

 

Name Type Description
status string

If the operation was successful, the status will be 'get_ticket_ok'

If the result was not successful, the status field can be:

  • 'application_restricted' - You provided an invalid api_key, or the api_key is restricted from calling this function

  • 'wrong_input' - When no api_key parameter is provided.

ticket string The ticket used to generate an authentication page and login a user

 

 

 

REST

 

Request

 

https://www.box.net/api/1.0/rest?action=get_ticket&api_key=rrc1d3ntb53tt6b2vhail6rdtrsxov3v

 

Response

 

<?xml version='1.0' encoding='UTF-8'?>
<response>
<status>get_ticket_ok</status>
<ticket>bxquuv025arztljze2n438md9zef95e8</ticket>
</response>

 

SOAP

 

Request

 

<?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_ticket>
<api_key xsi:type="xsd:string">rrc1d3n4b53tt6b2vh1il6tdtrsxov3v</api_key>
</tns:get_ticket>
</soap:Body>
</soap: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:get_ticketResponse>
<status xsi:type="xsd:string">get_ticket_ok</status>
<ticket xsi:type="xsd:string">819f55922d47097715b723218176a3a5</ticket>
</ns4:get_ticketResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

 

XML

 

Request

 

<?xml version='1.0' encoding='UTF-8' ?>
<request>
<action>get_ticket</action>
<api_key>rrc1d3ntb53tt6b2vhail6rdtrsxov3v</api_key>
</request>

 

 

Response

 

<?xml version='1.0' encoding='UTF-8'?>
<response>
<status>get_ticket_ok</status>
<ticket>bxquuv025arztljze2n438md9zef95e8</ticket>
</response>

 


 

Need additional assistance? Please feel free to Contact us