ApiFunction_register_new_user

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

register_new_user

 



Description

 

This method is used to register a new user.

 

 

Input parameters:

 

Name Type Description
api_key string The API key obtained when registering a project with OpenBox.
login string The login username for the user you intend to create.
password string The login password for the user you intend to create.

 

Output parameters:

 

Name Type Description
status string

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

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

  • 'email_invalid' - The login provided is not a valid email address.
  • 'email_already_registered' - The login provided is already registered by another user.
  • 'application_restricted'- You provided an invalid api_key, or the api_key is restricted from calling this function.
  • 'e_register' - Generic error warning for other errors.
auth_token string The authentication token used for most API methods, to access and apply operations to a user's account.
user SOAPUser 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=register_new_user&api_key=rrc1d3ntb53tt6b2vhail6rdtrsxov3v
&login=email@example.com&password=123

 

Response

 

<?xml version='1.0' encoding='UTF-8' ?>
<response>
<status>successful_register</status>
<auth_token>29135479a888671e0dd6512df4f7a009</auth_token>
<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>
</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:register_new_user>
<api_key xsi:type="xsd:string">rrc1d3ntb53tt6b2vhail6rdtrsxov3v</api_key>
<login xsi:type="xsd:string">tapi@email.com</login>
<password xsi:type="xsd:string">password</password>
</tns:register_new_user>
</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:register_new_userResponse>
<status xsi:type="xsd:string">successfu'_register</status>
<sid xsi:type="xsd:string">70608aca552d69d475e48ec602119d4a</sid>
<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"/>
</user>
</ns4:register_new_userResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

 

XML

 

Request

 

<?xml version='1.0' encoding='UTF-8' ?>
<request>
<action>register_new_user</action>
<api_key>rrc1d3ntb53tt6b2vhail6rdtrsxov3v</api_key>
<login>email@example.com</login>
<password>123</password>
</request>

  

Response

 

<?xml version='1.0' encoding='UTF-8' ?>
<response>
<status>successful_register</status>
<auth_token>29135479a888671e0dd6512df4f7a009</auth_token>
<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>
</user>
</response>

 


 

Need additional assistance? Please feel free to Contact us