OpenBoxBoxParameters

Page history last edited by sam@... 1 yr ago

Box Parameters

 

These are the parameters that can be sent to your server if you ask for them in Callback parameters when you are editing your service. To use them, you surround them with #'s, e.g. '#download_url#'. This is done for you automatically when you click the parameters in Callback parameters.

 

Note: You do NOT automatically get any of these parameters sent to your callback URL - you have to ask for them in the Callback Parameters'' section of editing your service.

download_url This is a direct URL to download the file. Your API may use this to get the file to display it to the user (in a popup action), or to get the file to process it in a server-side action. Do not email or publish this URL: see shared_page_url below for that.

Note: This URL is limited to 100 downloads to prevent abuse. Each time you perform an action, you'll get a new download_url which can be downloaded 100 more times. If this is too restrictive for your application, please contact developers at box.net.

overwrite_url The address your application should use to send back a file which should overwrite the original. For details on the proper way to send a request to this URL, please see overwrite.

An example of using this would be if you were an image editing service. You can ask for both the download_url to get the file, then after the user has manipulated the file in your interface, and they click "Save", you can use the overwrite_url to save the file back to Box to overwrite the original.

new_copy_url The address your application should use to send back a file which should create a new file in the user's account. For details on the proper way to send a request to this URL, please see new_copy.

The file sent to this URL is created as a new file in the user's account with the name 'Copy of ' in the same folder as the original file.

shared_page_url The URL to a pretty shared page URL. Useful for e-mailing links to friends, publishing links on blogs, and so on. Use this instead of download_file_url when sharing or publishing a link to the file.
user_id The id of the Box user. This is particularly helpful in a popup action where the user authenticates with you on your site before completing their action. You can store their Box user id in a table which references their account on your site, then all subsequent OpenBox actions taken by the user can be automatically authenticated.
user_name The full name of the Box user. Not all Box users have their name specified, so at times this maybe simply an email address.
file_id The id of the file. Primarily useful for performing Box API calls on the file.
file_name The name of the file.
file_extension The extension of the file.
auth_token A file auth token, used for calls to the Box API. More information...

 

redirect_to_box_url For popup actions only. ''Return to Box with this URL. You must append the following to this URL for your action to be successful:

 

&status=<success  |  failure>&message=<confirmation message>

Of course if you do not want to append this in your application, you may specify the entire URL in Callback Parameters as such for the success URL:

#redirect_to_box_url#&status=success&message=Your%20action%20was%20successful%2E

And you may specify a failure URL as such:

#redirect_to_box_url#&status=failure&message=Your%20action%20was%20unsuccessful%2E
base64_encoded_file The base64 encoded file. This is the only way to get the file directly sent to your server (i.e. if you don't use download_file_urL) if you are using XML or SOAP.

 

 


 

Need additional assistance? Please feel free to Contact us