private_share

 

input parameters:

  • api_key: string
  • sid: string
  • target: string
  • target_id: long
  • emails: ArrayOfString
  • message: string
  • notify: boolean

output parameters:

  • status: string

 

This method privately shares a file or folder with another user(s).

The 'target' parameter should be set to either a 'file' or 'folder'.

'target_id' is the id of the file or folder to be shared.

'emails' is an array of emails of users with whom to share files.

If the 'notify' parameter is true, then a notification email will be sent to users.

'message' is a message to include in the notification email.

 

Note: currently only files can be shared privately.

 

On a successful result, the status will be 'private_share_ok'.

If the result wasn't successful, the status field can be:

  • 'private_share_error'
  • 'wrong_node'
  • 'not_logged_in'
  • 'application_restricted'

 

REST

 

Request

www.box.net/api/1.0/rest?action=private_share&api_key=rrc1d3ntb53tt6b2vhail6rdtrsxov3v&auth_token=7pdreq6aqtq7udn986mxnp8lpq1ol0ec&target=folder&target_id=4935&emails[]=email@example.com&message=hey¬ify=true

 

Response

<?xml version='1.0' encoding='UTF-8'?>
<response>
    <status>private_share_ok</status>
</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:private_share>
            <api_key xsi:type="xsd:string">rrc1d3ntb53tt6b2vhail6rdtrsxov3v</api_key>
            <sid xsi:type="xsd:string">baa8b089c5a635adc0baa68aa1c61bbe</sid>
            <target xsi:type="xsd:string">file</target>
            <target_id xsi:type="xsd:long">3687</target_id>
            <emails href="#id1" />
            <message xsi:type="xsd:string">message here</message>
            <notify xsi:type="xsd:boolean">true</notify>
        </tns:private_share>
        <soapenc:Array id="id1" soapenc:arrayType="xsd:string[1]">
            <Item>some@email.com</Item>
        </soapenc:Array>
    </soap:Body>
</soap:Envelope>

Response

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope  xmlns:SOAP-ENV="http://sch'mas.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:private_shareResponse>
            <status xsi:type="xsd:string">private_share_ok</status>
        </ns4:private_shareResponse>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

 

XML

 

Request

<?xml version='1.0' encoding='UTF-8' ?>
<request>
    <action>private_share</action>
    <api_key>rrc1d3ntb53tt6b2vhail6rdtrsxov3v</api_key>
    <auth_token>7pdreq6aqtq7udn986mxnp8lpq1ol0ec</auth_token>
    <target>file</target>
    <target_id>4935</target_id>
    <emails>
        <item>email@example.com</item>
    </emails>
    <message>hey</message>
    <notify>true</notify>
</request>

Response

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


 

Need additional assistance? Please feel free to Contact us


Page Information

  • 4 months ago [history]
  • View page source
  • You're not logged in
  • No tags yet learn more

Wiki Information


Update to PBwiki 2.0

An entirely new PBwiki experience, including folders and easier editing.

Convert Now for Free | Learn more