ApiFunction_get_account_info

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

get_account_info

 



Description

 

This method is used to get the user's account information. 

 

 

Input parameters:

 

Name Type Description
api_key string The API key obtained when registering a project with OpenBox.
auth_token string The ticket obtained from get_ticket, used to authenticate a user between Box and your application.

 

Output parameters:

 

Name Type Description
status string

Upon a successful registration, the status parameter will be 'get_account_info_ok'.

If registration 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.
  • 'not_logged_in' - The user did not successfully authenticate on the page provided in the authentication process.
user SOAPUser, Base64Binary An object providing basic information about a user's account (user_id, login, amount of storage space, etc).

 

 

 

REST

 

Request

 

https://www.box.net/api/1.0/rest?action=get_account_info&api_key=rrc1d3ntb53tt6b2vhail6rdtrsxov3v&auth_token=43543wrsd

 

Response

 

<?xml version='1.0' encoding='UTF-8' ?>
<response>
<status>get_account_info_ok</status>
<user>
<login>email@example.com</login>
<email>email@example.com</email>
<access_id>398387</access_id>
<user_id>398387</user_id>
<space_amount>1073741824</space_amount>
<space_used>0</space_used>
<max_upload_size>2147483648</max_upload_size>
</user>
</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_account_info>
<api_key xsi:type="xsd:string">rrc1d3ntb53tt6b2vhail6rdtrsxov3v</api_key>
<auth_token xsi:type="xsd:string">tapi@email.com</login>
</tns:get_account_info>
</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_account_infoResponse>
<status xsi:type="xsd:string">get_account_info_ok</status>
<user xsi:type="ns4:SOAPUser">
<login xsi:type="xsd:string">newuser@email.com</login>
<email xsi:type="xsd:string">newuser@email.com</email>
<access_id xsi:type="xsd:int" xsi:nil="true"/>
<user_id xsi:type="xsd:int">398376</user_id>
<space_amount xsi:type="xsd:long">1073741824</space_amount>
<space_used xsi:type="xsd:long" xsi:nil="true"/>
<max_upload_size xsi:type="xsd:long">2147483648</max_upload_size>
</user>
</ns4:get_account_infoResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

 

XML

 

Request

 

<?xml version='1.0' encoding='UTF-8' ?>
<request>
<action>get_account_info</action>
<api_key>rrc1d3ntb53tt6b2vhail6rdtrsxov3v</api_key>
<auth_token>43543wrsd</auth_token>
</request>

  

Response

 

<?xml version='1.0' encoding='UTF-8' ?>
<response>
<status>get_account_info_ok</status>
<user>
<login>email@example.com</login>
<email>email@example.com</email>
<access_id>398387</access_id>
<user_id>398387</user_id>
<space_amount>1073741824</space_amount>
<space_used>0</space_used>
<max_upload_size>2147483648</max_upload_size>
</user>
</response>

 


 

Need additional assistance? Please feel free to Contact us