Box Api
Box Api-my country mobile

Box Api

We are conducting a competition this week together with your close friends at Box, therefore that I presumed I would compose a quick tutorial about what steps to take to best to start employing the Box API at PHP. Within this brief tutorial, we will produce a straightforward program that provides opinions into a document by SMS.

Starting out with All the Box API at PHP

To start, you are going to wish to set up your job, Box. Head on to developers/services and click on the”Create New Application” button towards the top from the Webpage. Complete the typical advice together with everything you want. I named mine”My country mobile Commenter.” Pay attention to this API crucial Box offers you later clicking on”Continue,” you are going to want it after.


After assembling, your job was set up and click “edit application.” Scroll down somewhat and place the”Redirect URL” for a job’s URL in your own server. The Box will need users into a particular page when they have included their own application. (It will make sense in a little )

Now, to this other code. To begin with, catch Box’s PHP helper library. Once unzipping, then you need to have to produce one little edit into box lib php5.php. Edit lineup 3 3 and switch var $_adjuster to untrue. Add boxlibphp5.php along with class.curl.php for our own server (no demand for box_config.php, we will manage ourselves). Produce a document called index.php and glue. Dump the document shrub into output. Don’t forget to displace api_key together with your API important.


After you navigate into index.php, then you’re going to redirect. To Box, that can request that you sign into and insert your own application. As soon as you accomplish this, you’re going to be redirected to index.php, the authentication token will probably be stored to creds.txt, and you are going to receive yourself a ditch of one’s Box accounts document shrub. If that can be a fresh account for you personally, it’s going to be sterile. Publish a document and then refresh it. Pay attention to this file_id of the document that you wish to remark. It will look something such as. Notice: that the code is overlooking all of the whistles and bells such as storing the authentication token, Number fairly designs, and also actually enabling end-users to opt for file because I needed to help keep the attention on dealing using all the API. Remember to groom this up on your program )

Then produce a record known as handle-incoming-sms.php and glue re-place $api_key together with your API critical and target_id together with all the ID of this document that you wish to discuss. Catch a My country mobile phone-number and place its own SMS URL into handle-incoming-sms.php, and now you can now touch upon the document as a result of SMS. Go out and assemble something trendy with My country mobile and Box and also you will acquire a Mac book Air, a Galaxy Tab, and also some Parrot AR Drone at this week’s competition!