<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Peter Christensen on Medium]]></title>
        <description><![CDATA[Stories by Peter Christensen on Medium]]></description>
        <link>https://medium.com/@pchristensenPSE?source=rss-9bfce076b32f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*MHwWVjwD7EHsuerH.jpg</url>
            <title>Stories by Peter Christensen on Medium</title>
            <link>https://medium.com/@pchristensenPSE?source=rss-9bfce076b32f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 07:15:29 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@pchristensenPSE/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Let’s talk about UI Elements and interceptors]]></title>
            <link>https://medium.com/box-developer-blog/lets-talk-about-ui-elements-and-interceptors-3388e5a4941c?source=rss-9bfce076b32f------2</link>
            <guid isPermaLink="false">https://medium.com/p/3388e5a4941c</guid>
            <category><![CDATA[react]]></category>
            <category><![CDATA[axios]]></category>
            <category><![CDATA[interceptors]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[frontend]]></category>
            <dc:creator><![CDATA[Peter Christensen]]></dc:creator>
            <pubDate>Thu, 03 Apr 2025 14:41:25 GMT</pubDate>
            <atom:updated>2025-04-03T14:48:36.330Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u_4vNHVYuePIRM_8h2ULuQ.png" /></figure><p><a href="https://developer.box.com/guides/embed/ui-elements/">Box UI Elements</a> are used by lots of developers to embed Box Content in a custom experience on a web site. The speed of deployment and ease of use makes them very compelling. See more in these articles: <a href="https://medium.com/box-developer-blog/getting-started-with-box-ui-elements-using-react-dfa1dffb4e12">Getting Started with Box UI elements</a>, <a href="https://medium.com/box-developer-blog/lets-talk-about-integrating-box-6258891d95c4">Let’s talk about integrating Box</a> and <a href="https://medium.com/box-developer-blog/introducing-the-box-ui-elements-workshop-elevate-your-apps-user-experience-cfcbd05a0090">Introducing the Box UI elements workshop</a></p><p>Sometimes though there are some edge use cases where developers need to implement a very specific piece of functionality that is not directly supported in the UI Elements currently. For example</p><ul><li>Only allow PDFs to be uploaded with the upload component (or don’t allow ZIP files to be uploaded).</li><li>Show a message/banner based on metadata on the file(s) or folder.</li><li>Exclude certain files from view</li><li>Automatically refresh the access token if expired</li><li>Add a prefix to uploaded files</li><li>Custom logging of requests and responses for monitoring purposes</li></ul><p>One solution to these use cases functionality is using ‘interceptors’. These are javascript functions that directly allows the developer to manipulate the request and response to and from theBox API. They are part of the <a href="https://github.com/axios/axios">Axios</a> library that is used by the Box UI elements to facilitate the communication between the client and the Box API.</p><p><em>It is important to state that any interceptor changes will only effect the client experience, not Box permissions or settings.</em></p><p>Box UI Elements supports two interceptor patterns:</p><ol><li>Request Interceptor: Access and manipulate the request being sent to the Box API.</li><li>Response Interceptor: Access and manipulate the response from the Box API</li></ol><h3>Setup</h3><p>I have a standard HTML page that contains a <a href="https://developer.box.com/guides/embed/ui-elements/explorer/">Box UI Element content explorer</a> and a request and response interceptor example. Currently, they just write the value of the config object to the console. The config object is the data about the request or response that I get access to manipulate. So for requests, I can change the headers, the url and the data passed, and for the response I can change the data that has been returned.</p><pre> var myResponseInterceptor = (config) =&gt; {<br>            console.log(config);<br>   return config;<br>    };<br>    var myRequestInterceptor = (config ) =&gt; {<br>            console.log(config);<br>   return config;<br>    };<br>        var accessToken = &quot;&lt;DEVELOPER TOKEN&gt;&quot;;<br>        var folderId = &quot;&lt;FOLDER ID&gt;&quot;;<br>        var explorer = new Box.ContentExplorer();<br>        explorer.show(folderId, accessToken, <br>        {<br>            &quot;container&quot;:&quot;.container&quot;,<br>            &quot;requestInterceptor&quot;:myRequestInterceptor,<br>            &quot;responseInterceptor&quot;:myResponseInterceptor<br>        });</pre><p>An intercepted GET request looks something like this and will give access to manipulate the URL being requested, the headers and the query parameters.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/820/1*GP6t6GY9nV4XrkAW0CQWzg.png" /></figure><p>An intercepted POST request looks something like and gives access to the posted data as well:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/796/1*TIFZtuq_GrLyk8MCbRw8qg.png" /></figure><p>And an intercepted response looks something like this, allowing me to interrogate both the returned data and the details of the request that resulted in the response.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/702/1*1SLwVF7DAePw9GRFIHCBNA.png" /></figure><h3>First example — exclude ZIP files from upload</h3><p>Let’s look at my first example. I want to make sure that the user cannot upload ZIP files to Box via our UI Element. Of course I can add a message to the page etc., but I really want to avoid any ZIPs going into the folder.</p><p>So to do this I need to intercept the request to upload a zip and make sure it does not complete.</p><ol><li><strong>Identify the request that is responsible for the upload. </strong><br>This does require some knowledge of the the workings of the Box API, so I look at <a href="https://developer.box.com/reference/post-files-content/">this upload file reference</a> and determine that if it is a POST call to a URL that starts with ‘https://upload’. it is a upload call being made.</li><li><strong>Check the name<br></strong>The name of the file will be in the data attributes for POST requests with formData which the upload endpoint use. The formData is actually a JSON string so it will need to be parsed to a JSON object to access the individual attributes.</li><li><strong>Set a different URL<br></strong>As I don’t want the file to upload I can change the URL to ‘something else’ — here I add a URL to the Box API that I know will return an error. This will make the request fail and the file will not be uploaded. I cannot directly cancel the request so use a ‘fake’ redirect it instead.</li><li><strong>Alert the user<br></strong>Here I add a javascript alert but it could also write to a banner or notification on the page.</li></ol><pre> var myRequestInterceptor = (config ) =&gt; {<br>      console.log(config);<br>      if ( config.method == &quot;post&quot; &amp;&amp; config.url.startsWith(&quot;https://upload&quot;)) {<br>          var formDataAttributes = JSON.parse(config.data.attributes);<br>          if (formDataAttributes.name.endsWith(&quot;.zip&quot;)) {<br>            console.log(&quot;No zip files allowed&quot;);<br>            //send to another URL that will error<br>            var rejectURL = &quot;https://api.box.com/2.0/files/badextension&quot;;<br>            config.method = &quot;get&quot;;<br>            config.url = rejectURL;<br>            //Alert the user - could also display a banner or similar<br>            alert(&quot;Please upload anything other than ZIP files.&quot;);<br>          }<br>      }<br>      return config;<br>    };</pre><p>When I load my page and try to upload a zip file I get this alert</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/448/1*1xonOUR_x3UH_-68xHLPow.png" /></figure><p>and this message in the UI Element uploader</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/671/1*BCATsCtXfIuueyHY9WyN7Q.png" /></figure><p>Check the <a href="https://gist.github.com/pchristensenB/feb39020c051ee319e08e7131ba8a03c">GitHub gist</a> with the page.</p><h3>Second example — exclude docx, xlsx and pptx from the list of files</h3><p>In this example I want to load the UI Element Content Explorer but I want to exclude xlsx, pptx and docx files from the view in the list.</p><p>To achieve this I need to intercept the response from Box and remove entries from the returned list of items.</p><ol><li><strong>Identify the response that contains the file list<br></strong>There two ways of getting a list of files for folder. The <a href="https://developer.box.com/reference/get-folders-id/">/items endpoint</a> or <a href="https://developer.box.com/reference/get-folders-id/#param-fields">the folder information endpoint</a> (by including the ‘item_collection’ field). By logging the requests I can see that the UI elements use the second option</li><li><strong>Alter the response to omit files with a give extension<br></strong>The response data holds the item_collection which has a list of all the returned files. I add a filter that removes the three office formats</li></ol><pre>  var myResponseInterceptor = (config) =&gt; {<br>      if(config.request.responseURL.includes(&#39;item_collection&#39;)) {<br>          config.data.item_collection.entries = config.data.item_collection.entries.filter((entry) =&gt; {<br>            return !entry.name || !/\.(docx|xlsx|pptx)$/i.test(entry.name);<br>          });<br>       }<br>  return config;<br>};</pre><p>Before implementing the interceptor:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1020/1*YGsRyz5-qET-MEbI6wppgw.png" /></figure><p>After implementing the interceptor:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/984/1*Hp2lZvQTxaWNSqbiTBzwNg.png" /></figure><p>Check the <a href="https://gist.github.com/pchristensenB/f29136dfcf2f006c12800f16a97fa43b">GitHub Gist</a> with the page.</p><h3>Third example — add a banner to preview if the file has malware</h3><p>This interceptor can mimic what the box.com app experience is when a file is identified with malware via <a href="https://www.box.com/shield">Box Shield security</a>. Box Shield can scan all uploaded files for malware and add additional protections (such as disable downloads) and alerting admins of the file. If a file has been identified with malware, Box will add a global metadata template instance called ‘MalwareDeepScan’ to the file.</p><p>For this interceptor I need to do three things.</p><ol><li><strong>Add the malware metadata template to the request<br></strong>To be able to read the malware metadata I need to make sure that it is requested as part of the response. I do this by adding it to the list of fields for the file that is being previewed from the Box UI Element.</li><li><strong>Check the malware attribute on the response<br></strong>The response will list the values of all the fields requested. If the malware metadata is present on a file it means Box Shield has identified malware in the file.</li><li><strong>Display a banner above the preview if the file has been identified with malware<br></strong>A bit of HTML to show a banner on the page if the file has been identified with malware</li></ol><pre>var myResponseInterceptor = (config) =&gt; {<br>      //If the type of the returned data is file and the metadata is not null, then prepend a malware warning banner<br>     if(config.data.type &amp;&amp; config.data.type==&#39;file&#39;) { <br>        if(config.data.metadata!=null) {<br>          $(&quot;#banner&quot;).text(&#39;Malware detected&#39;);<br>        }<br>   };<br>   return config;<br>};</pre><pre>var myRequestInterceptor = (config ) =&gt; {<br>   if(config.url.startsWith(&#39;https://api.box.com/2.0/files&#39;)) {<br>      //Clear the banner<br>      $(&quot;#banner&quot;).text(&#39;&#39;);<br>      let params = config.params;<br>      //Inject the metadata.global.MalwareDeepScan field into the request<br>      params.fields+=params.fields + &#39;,metadata.global.MalwareDeepScan&#39;;<br>      config.params = params;<br>   }<br>   return config;<br>};</pre><p>Preview of Malware infested document</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4pbJjZaamJ6K9QzSVnAvcA.png" /></figure><p>Preview of regular document</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ih0JMQpKGc7-x3WY6Rq6yw.png" /></figure><p>Check <a href="https://gist.github.com/pchristensenB/e0984e34feeba450ea8257f829ea8958">the GitHub gist</a> with the page</p><h3>Further reading</h3><p>More details about the Axios interceptor pattern:</p><ul><li><a href="https://github.com/axios/axios?tab=readme-ov-file#request-config">https://github.com/axios/axios?tab=readme-ov-file#request-config</a></li><li><a href="https://github.com/axios/axios?tab=readme-ov-file#response-schema">https://github.com/axios/axios?tab=readme-ov-file#response-schema</a></li><li>Demonstrator site where you can test the interceptors against your own environment: <a href="http://pcboxdemo.github.io/interceptor/index_oauth.html">http://pcboxdemo.github.io/interceptor/index_oauth.html</a></li></ul><p><a href="https://developer.box.com/guides/embed/ui-elements/">UI Elements</a></p><p>🦄 <em>Want to engage with other Box Platform champions?</em></p><p><em>Join our</em><a href="https://community.box.com/box-platform-5"><em> Box Developer Community </em></a><em>for support and knowledge sharing!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3388e5a4941c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/box-developer-blog/lets-talk-about-ui-elements-and-interceptors-3388e5a4941c">Let’s talk about UI Elements and interceptors</a> was originally published in <a href="https://medium.com/box-developer-blog">Box Developer Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Let’s talk about Service Accounts]]></title>
            <link>https://medium.com/box-developer-blog/lets-talk-about-service-accounts-376ce7c2fc46?source=rss-9bfce076b32f------2</link>
            <guid isPermaLink="false">https://medium.com/p/376ce7c2fc46</guid>
            <category><![CDATA[api]]></category>
            <category><![CDATA[box]]></category>
            <category><![CDATA[architecture]]></category>
            <dc:creator><![CDATA[Peter Christensen]]></dc:creator>
            <pubDate>Wed, 08 Jan 2025 16:39:47 GMT</pubDate>
            <atom:updated>2025-01-08T16:39:47.173Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/750/0*JuXjYEK1ZIEWD9wg.png" /></figure><p>In my role as a Platform Solutions Engineer at Box I am very fortunate to talk to a lot of customers about how best to integrate Box API into their custom experiences and applications. I wrote a previous post about <a href="https://medium.com/box-developer-blog/lets-talk-about-box-app-users-3ee3692c64f1">Box app users</a>, outlining how you can seamlessly integrate Box as the content layer for your custom app and map identity between Box and your chosen identity management system. In this article I will dive deeper into different patterns for integrations using App Users and Service Accounts, outline the main differences and pros and cons for each approach.</p><p>First a couple of concepts I will use throughout this article. In the world of Box Platform a Service Account refers to an API only user. Most often it will be the user that is created when a <a href="https://developer.box.com/guides/applications/app-types/custom-apps/">custom Box application</a> is authorized by the Box admin of the enterprise. The Service Account can interact with the Box API as the application and has, depending on the scopes set in the application, some co-admin capabilities. An App User refers to an API only user in Box that is created by a Service Account and thus belongs to that specific application. Customers can have multiple applications on Box and each can exist without being able to access content or users from each other.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/680/0*xcOwG8VRq0E1wpgg.png" /></figure><p>The main conceptual difference is that a Service Account is not normally tied to an identity where an App User normally is. For the purposes of this article, this is the main difference that is important for the pros and cons for each model.</p><p>The use cases I am addressing in this article are primarily user facing applications where users interact with content. The application could be a content portal, a vendor management system, case management or support ticket system to name a few. What they all often have in common is that they have their own user, role and permissions setup in terms of accessing data. So when customers look at integrating Box into the application the question of how to manage users, role and permissions comes up. Often the content will be associated with a ticket, a case or a specific user and determining access can sometimes be complex and dynamic.</p><p>When approaching this I would normally focus on two different models: The “App User model” and the “Service Account model”.</p><h3>App User Model</h3><p>In the ‘App User model’ each user of the existing system is represented by an App User in Box. There is a direct and unique mapping between the identity system of the customer application and Box. Once trust has been established via a login process, which can be SSO, MFA etc, the user can interact with the Box API via the application with the identity that has been established at login time. This allows the use of Box permissions throughout the app, so for example in a content portal scenario the application would show only the content the user has access to and all events triggered by user actions will be logged as coming from the specific named user as shown in the diagram below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*shoydmMP4tu24l5a" /><figcaption>App user flow</figcaption></figure><h3>Service Account model</h3><p>In the ‘Service Account model’ all interaction with the Box API goes via a single (or multiple) service account(s). The key is that these are not associated with a user identity. This means no mapping of users between Box and the existing application is required. Access to content is then driven by the permissions and access in parent application. The service account will have access to all relevant content but only surface the correct content based on the permissions of the logged in user.</p><p>For example, a case management system, a user would have access to a number of cases and would only be able to access content for these cases as the parent application would control when and where the content is surfaced. In this model <a href="https://developer.box.com/guides/authentication/tokens/downscope/">token downscoping</a> becomes important to control access to the content by parent applications and integrations as the Service Account it self have full access to the body of content relevant to the application use case. As shown in the diagram below, all actions performed on content will be logged as coming from the Service Account which can make features such as commenting, annotations and tasks hard to use as require a user persona to really make sense.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*zB-ZKELgf_Vk3O6l" /><figcaption>Service account flow</figcaption></figure><h3>Pros and cons App User model</h3><p>The main advantage of the ‘App User model’ is the ability to tie an external identity to a Box user without having that user authorize to Box. This means that all API interactions the user has with content in Box is audited correctly and you can fully utilize Box permissions for content access and collaboration. You can use features like preview, commenting, annotations, tasks etc. freely via API and UI elements and each action will be logged as having been performed by the user.</p><p>For some systems however, keeping track of permissions and synching between systems can be a complex task, especially in environments where permissions and roles are very dynamic or where the user access does not enable a 1–1 mapping.</p><h3>Pro and cons of Service Account model</h3><p>The service account model can simplify the integration between Box and other systems by funneling all requests via a single user, but the consequence is that the auditing of user events will not reflect the user who performed the action. Sometimes this is a requirement for compliance or application reasons so should be an important consideration for choosing a model like this. Also, the standard Box permissions and sharing features will not be applicable for this model as all content interactions are performed as a single user.</p><p>The Service Account model is well suited for situations where a user identity is not required or applicable to the use case. For example when it involves automations and back-office processing, transient user types or where complexity and dynamics make it difficult to use the app user model.</p><h3>In conclusion</h3><p>I work with customers that utilize both models, even some at the same time as the reality is not always straight forward. The most common pattern is that the ‘App User model’ is the most desired for use cases where end-users access content via a custom application as it is more natural in terms of managing users, permissions and events. Especially where there is a need for audit logs, either for compliance or business reasons — as in ‘we need to be able to prove a user viewed a document or we need to implement business logic around user driven events’.</p><p>Some customers will start out with the Service Account model as it is simpler to implement and manage given the single access point to the Box API and eventually progress to an app user model as it gives more flexibility.</p><p>Box Platform is flexible enough to support both types of models and features such as UI elements and token downscoping makes developers to provide a compelling and secure experience for users.</p><h4>Read more</h4><p><a href="https://developer.box.com/">https://developer.box.com</a> — our main dev site</p><p><a href="https://developer.box.com/platform/user-types/">https://developer.box.com/platform/user-types/</a> — user types explained</p><p>🦄 <em>Want to engage with other Box Platform champions?</em></p><p><em>Join our</em><a href="https://community.box.com/box-platform-5"><em> Box Developer Community </em></a><em>for support and knowledge sharing!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=376ce7c2fc46" width="1" height="1" alt=""><hr><p><a href="https://medium.com/box-developer-blog/lets-talk-about-service-accounts-376ce7c2fc46">Let’s talk about Service Accounts</a> was originally published in <a href="https://medium.com/box-developer-blog">Box Developer Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Let’s talk about folder tree reports]]></title>
            <link>https://medium.com/box-developer-blog/lets-talk-about-folder-tree-reports-50f85a0739ff?source=rss-9bfce076b32f------2</link>
            <guid isPermaLink="false">https://medium.com/p/50f85a0739ff</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[box]]></category>
            <category><![CDATA[typescript]]></category>
            <category><![CDATA[oauth2]]></category>
            <dc:creator><![CDATA[Peter Christensen]]></dc:creator>
            <pubDate>Tue, 04 Jun 2024 15:02:24 GMT</pubDate>
            <atom:updated>2024-06-04T15:11:32.047Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O7bMTmFJ_h4mGrGb1HWmkg.png" /></figure><p>In my role as a Platform Solutions Engineer at Box I often come across customers who have edge requirements that cannot be solved by Box directly. In these cases we’ll often look for an existing integration but in some cases building a custom app with our APIs is the way to go and recently I had a chance to build a prototype that I will share in this article.</p><p>We can call it an Exportable Deal Room Overview (snappy name for sure)... or just a Folder Tree Report. The Deal Room concept is used in several industries like legal and financial to collaborate on a deal/project or similar. It will often consist of a fixed folder structure, with fixed permissions where documents are collaborated on. The requirement I am trying to meet with this prototype is to create an exportable deal room overview that lists the entire folder tree with files and <a href="https://support.box.com/hc/en-us/articles/360043697094-Creating-Shared-Links.">shared links</a> to the files. This can help due dilligence checks and serve as both a point in time reference for easy access and overview of what is in the deal room and also for access when deal is closed. There will inevitably be use cases outside the mentioned industries as well.</p><p>This is what it will look like…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/862/1*yMunO6iSLay-turruBAtng.gif" /></figure><h3>The solution</h3><p>The solution I came up with is implemented as a<a href="https://developer.box.com/guides/applications/web-app-integrations/"> web app integration</a> that can be invoked on a folder. For the API access I used the <a href="https://developer.box.com/sdks-and-tools/#next-generation-sdks">new TypeScript SDK </a>that was published by Box earlier this year as part of our new autogenerated SDK push.</p><h4>Web app integration and authentication</h4><p>To create a Box web integration I first create an OAuth 2.0 app. The app will manage the authorization and authenication of my integration.</p><p>From the <a href="https://app.box.com/developers/console/">developer console</a> I create a custom OAuth 2.0 app in two easy steps.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*XLUAkAGta163RMZ5YzhIrw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*X4lpjebFA6OiBxt4CeuiEw.png" /></figure><p>From the configuration tab I need the the clientId and clientSecret for my app.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*cT-EzAHkSI1UkSOLNw9Nkw.png" /></figure><p>Next I create the integration from the integrations tab. This is what will show up for the user in the Box web app.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*Fd4S24a-7eL00GAEzQJMwQ.png" /></figure><p>The callback URL <strong>must</strong> be https so while I did a initial development and testing on my localhost, the app must eventually be deployed to a https endpoint. I used <a href="https://pages.github.com/">GitHub pages</a> for this prototype as it is free and easy to setup. For the authentication piece I used a method I had used before which is a simple AWS Lamdba function which can be setup following the detailed instructions in this this <a href="https://github.com/pchristensenB/box-videobookmarking-demo">GitHub repo</a>.</p><p>The client callback URL I use is as below and parameters must be named as shown as these are used by the token generator. The <em>clientId</em> is required for the AWS Lambda function that does the token exchange. h<a href="https://pcboxdemo.github.io/indexer/index.html?clientId=THE_CLIENT_ID_COPIED">ttps://pcboxdemo.github.io/indexer/index.html?clientId=THE_CLIENT_ID_COPIED_EARLIER</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*N8hHE3IUgIjL26PayrtvFA.png" /></figure><p>When the app has been created and configured I have this new item on my Integrations menu for folders</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8zBNbtLAoSxQMWR5TvPxVA.png" /></figure><p>The authentication happens in the <a href="https://github.com/pchristensenB/box-videobookmarking-demo/blob/main/box-token-generator/index.js">AWS lambda function</a> where the authorization code is exchanged for an access token using the <a href="https://developer.box.com/reference/post-oauth2-token/">token access request with authorization grant</a>. I use the <a href="https://github.com/box/box-node-sdk/blob/main/docs/authentication.md#traditional-3-legged-oauth2">Node.js SDK</a> in the code for the Lambda.</p><pre>  var sdk = new BoxSDK({<br>    clientID: clientId,<br>    clientSecret: secret,<br>  });<br>  //Get the tokens from Box using the Auth code<br>  await sdk.getTokensAuthorizationCodeGrant(<br>    authCode, null, function (err, tokenInfo) {<br>      tokens = {<br>        token: tokenInfo.accessToken,<br>        refreshToken: tokenInfo.refreshToken<br>      };<br>    }<br>  );</pre><p>The Lambda returns the token obtained during the token exchange above to the calling page and the authentication part on the index.html page is as below. I run it when the page loads so I have access to the Box API immediately</p><pre>$.ajax({<br>    method: &#39;get&#39;,<br>    url:&quot;https://MY_LAMBDA_GATEWAY_URL/default/box-node-token-generator&quot;,<br>    data: { authCode: params.get(&#39;auth&#39;), clientId: params.get(&#39;clientId&#39;) },<br>    crossDomain: true,<br>    cache: false,<br>    success: async function (response) {<br>      //set the token<br>      token = response.token;<br>      try {<br>          //Create a Box client using the token<br>          client = new BoxClient({auth: new BoxDeveloperTokenAuth({token }),<br>          });<br>          //Enable the generate button as we now have access to Box API<br>          $(&quot;#generate&quot;).prop(&quot;disabled&quot;,false);<br>        } catch (e) {<br>          console.error(e);<br>        }<br>    }<br>  });</pre><h3>The application</h3><p>The application is created as a single web page.</p><h4><strong>Choose the shared link type</strong></h4><p>Across the top of the page I have the below to allow a user to choose what type of shared link they want for the report (defaults to none)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e8Ao5n2AWKXTiP5JUM2u9w.png" /><figcaption>Page header with buttons and shared link options</figcaption></figure><h4><strong>Generate the folder structure</strong></h4><p>When the user clicks on the ‘Generate’ button the below function is called. To generate the entire folder structure I recursively call the <a href="https://github.com/box/box-typescript-sdk-gen/blob/main/docs/folders.md#list-items-in-folder">List items in folder</a> function.</p><pre>  async function getItems(folderId,parentId) {<br>    let items = await client.folders.getFolderItems(folderId);</pre><p>Next I iterate through the items of the folder and if the item is a folder I call the function again to make sure I get all the data I need. For rendering I use an &lt;ul&gt; element for each folder as a container and a &lt;li&gt; element for the individual folder contained within.</p><pre>$.each(items.entries, function(k, data) {<br>    //If folder, add it to the list and get items for this folder<br>    if(data.type==&#39;folder&#39;) {<br>        var folderListContainer = $(&quot;&lt;ul id=&quot;  +data.id + &quot;&gt;&lt;/ul&quot;);<br>        //Append this folder to the list of folders<br>        folderListContainer.append($(&quot;&lt;li class=&#39;uf&#39;  parent=&quot; + <br>          parentId + &quot;&gt;&quot;+data.name + &quot;&lt;/li&gt;&quot;));<br>        //Append the list of folders to the parent<br>        $(&quot;#&quot; + folderId).append(pfolderListContainer);<br>        getItems(data.id,folderId);<br>    }</pre><p>If the item is a file I check if the request was to have a shared link with the file. If not I simply add the file name to an &lt;li&gt; element and append to the parent folder. Note the app comes with icons for standard Box files so based on file extension an appropriate icon is used.</p><pre>    else if(data.type==&#39;file&#39;) {<br>        //If no shared link required, just output the file name and icon and attach to parent<br>        if(sharedLink==&#39;None&#39;) {<br>            fileListContainer.append($(&quot;&lt;li class=&#39;pf&#39; id=&#39;u_&quot; + <br>              folderId + &quot;&#39;&gt;&lt;img height=16 width=16 src=&#39;iconsbox/&quot; + <br>              data.name.split(&#39;.&#39;).pop().toLowerCase() + &quot;.svg&#39;/&gt; &quot;+<br>              data.name +&quot;&lt;/li&gt;&quot;));<br>        }</pre><p>If a shared link was requested, I generate (or reuse) the link and then append to the parent folder. Because I might have to create many links I do this asynchronously to make it dynamic using a placeholder text for the file until the shared link is created.</p><pre>  else {<br>      //If shared link requested - first check if shared link already exists<br>      var link;                <br>      if(data.shared_link==null || data.shared_link.access!=sharedLink) {<br>          //Create shared link and append file with place holder text. <br>          //Will be updated by async function<br>          link = createSharedLink(data.id,sharedLink,data.name);<br>          fileListContainer.append($(&quot;&lt;li class=&#39;pf&#39; id=&#39;u_&quot; + folderId + &quot;&#39;&gt;&quot; + <br>            &quot;&lt;img height=16 width=16 src=&#39;iconsbox/&quot; + <br>            data.name.split(&#39;.&#39;).pop().toLowerCase() + &quot;.svg&#39;/&gt; &quot;+<br>            &quot;&lt;a id=l_&quot;+data.id + &quot; href=&quot; + link + &quot; target=_blank&gt;&quot; + <br>            &quot;Generating link..&lt;/li&gt;&quot;));<br>      }<br>      else {<br>          //Use existing shared link and append file<br>          link = data.shared_link.url;<br>          fileListContainer.append($(&quot;&lt;li class=&#39;pf&#39; id=&#39;u_&quot; + folderId + &quot;&#39;&gt;&quot; + <br>            &quot;&lt;img height=16 width=16 src=&#39;iconsbox/&quot; + <br>            data.name.split(&#39;.&#39;).pop().toLowerCase() + &quot;.svg&#39;/&gt; &quot;+<br>            &quot;&lt;a id=l_&quot;+data.id + &quot; href=&quot; + link + &quot; target=_blank&gt;&quot; + <br>            data.name +&quot;&lt;/li&gt;&quot;));<br>      }<br>  }<br>}</pre><p>The shared link is created asynchronously using the <a href="https://github.com/box/box-typescript-sdk-gen/blob/main/docs/sharedLinksFiles.md#add-shared-link-to-file">add shared link to file</a> function.</p><pre>async function createSharedLink(fileId,type,name) {<br>      let sharedLinkObject = await client.sharedLinksFiles.addShareLinkToFile(<br>      fileId, <br>       {sharedLink: { access: sharedLink } }<br>      ,{ fields: &#39;shared_link&#39;  } );<br>      //Set the URL for the file &lt;li&gt; to the shared link <br>      $(&quot;#l_&quot; + fileId).attr(&quot;href&quot;,sharedLinkObject.sharedLink.url);<br>      //Set the text to the name of the file<br>      $(&quot;#l_&quot; + fileId).text(name);<br>};</pre><h4>Export to PDF</h4><p>For exporting to PDF I use the <a href="https://www.npmjs.com/package/html2pdf.js/v/0.9.0.">html2pdf</a> library. It will take any DOM element and convert to pdf and download for the user.</p><pre>  //Generates a PDF from specified HTML DOM Element<br>    $(&quot;#pdfgen&quot;).click( function() {<br>        const element = document.getElementById(&#39;index&#39;);<br>        // Choose the element and save the PDF for your user.<br>        html2pdf().from(element).save();<br>    })</pre><p>The dynamic report generation looks like this when completed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/862/1*yMunO6iSLay-turruBAtng.gif" /></figure><p>Thank you for getting this far. The complete repository for this prototype is here. It contains instructions for setting up the app as an integration in Box and also to run as a standalone app for local testing and development.</p><p><a href="https://github.com/pchristensenB/folder-tree-report/">Github repo for Folder Tree Report</a></p><p><em>Learn from Box Platform champions! </em>🦄 V<em>isit the </em><a href="https://forum.box.com/"><em>Box Developer Community</em></a><em> for support and knowledge sharing.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=50f85a0739ff" width="1" height="1" alt=""><hr><p><a href="https://medium.com/box-developer-blog/lets-talk-about-folder-tree-reports-50f85a0739ff">Let’s talk about folder tree reports</a> was originally published in <a href="https://medium.com/box-developer-blog">Box Developer Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Let’s talk about using Box Platform for Box.org]]></title>
            <link>https://medium.com/box-developer-blog/lets-talk-about-using-box-platform-for-box-org-5dd16fce9747?source=rss-9bfce076b32f------2</link>
            <guid isPermaLink="false">https://medium.com/p/5dd16fce9747</guid>
            <category><![CDATA[metadata]]></category>
            <category><![CDATA[cloud-services]]></category>
            <category><![CDATA[workflow]]></category>
            <category><![CDATA[box-api]]></category>
            <category><![CDATA[cloud]]></category>
            <dc:creator><![CDATA[Peter Christensen]]></dc:creator>
            <pubDate>Tue, 23 Apr 2024 10:59:12 GMT</pubDate>
            <atom:updated>2024-04-23T17:48:16.037Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1021/1*QnQ37UciKm7tb1vxz4yjzA.png" /></figure><p>Recently, I had a chance to work with <a href="https://www.box.org/home">Box.org</a>, which is the part of Box where we (as Boxers) can drive social impact and change through our work. It is an all around brilliant and essential part of Box. Previous to now, they had an application process for <a href="https://www.box.org/impact-fund">Box Impact Fund </a>with some time consuming steps like manual data input. So, I produced a script using one of our SDKs to analyze and extract the data into a CSV, allowing the administrators to add new entries to a tracking Google Sheet shared across the Box.org team. In this article, I outline the solution and also provide ideas and prototypes on how other parts of the <a href="https://developer.box.com/reference/">Box API Platform</a> could be helpful in managing the process and reducing manual steps.</p><p>The basic flow of the application process is as follows.</p><ol><li>Charities can apply for a Box Impact Fund grant by submitting an application to Box. This is done via a <a href="https://support.box.com/hc/en-us/articles/360045304813-Using-File-Request-to-get-Content-from-Anyone">File Request Link</a> which can be configured and setup by any Box user and provides a great way of securely and easily receiving content from people who are not part of your organization.</li><li>With the application, an applicant submits a short video to provide further context about their charity, as well as how they would put a potential Box grant to good use. This is stored along side the video in a <a href="https://developer.box.com/guides/metadata/">Box Metadata Template</a> in a designated Box Folder. A task is automatically created for the application.</li><li>A select team of Boxers screen the applications based on the task generated in step 2, moving the best to the next stage where a deeper evaluation will narrow it down to twelve finalists.</li><li>A judging panel made up of industry experts and several Boxers selects the final six that receive a grant. <a href="https://www.box.org/impact-fund">Read more about Box Impact Fund and judging panel</a></li></ol><p>The screening and approval tasks are all done via <a href="https://www.box.com/en-gb/collaboration/relay-workflow">Box Relay</a>, the intuitive workflow tool, where workflows can be configured configured by a Box user directly in the Box Webapp. The Relay workflow is configured to create a task when a user uploads via a File Request link.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xzrkSeA4D0YgfDcahpkuPg.png" /><figcaption>Screen shot of Relay</figcaption></figure><p>Along side the Relay tasks a Google Sheet stored in Box is used to allow the Box.org members to see all the applications (including associated metadata). It also lets them jump to each application and simultaneously review and also score applications as Box fully <a href="https://www.box.com/en-gb/partners/google">supports co-authoring on Google Sheets</a>.</p><p>The process looks like this today:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*15DxwkUMbGFITQcgmeERQw.png" /></figure><h3>Script to extract applications</h3><p>This is where I first got the help out. The Box.org team needed to get the documents and metadata from the applicants into the tracker Google Sheet and needed this automated. Given the tight deadline at the time I created this script that generates a CSV file for Box.org admins to transfer new applications to the tracker Google Sheet. Although the application process asks for a single file, some applicants will upload multiple files, so this script creates a CSV of the unique applications in the application folder. It is written using our <a href="https://github.com/box/box-java-sdk">Java SDK</a> and created as simple jar that can be invoked from the command line allowing the administrator in charge flexibility to decide when they want to extract new applications.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/969/1*_z5UvTF3Gk5qrz6Aown8LA.png" /></figure><p>The file request that is used for collecting applications stores all application video files with relevant metadata in a Box landing folder. This script iterates all files in that folder and outputs one line per unique applicant (based on email address), includes metadata and a link to open the application in Box.</p><p><a href="https://github.com/pchristensenB/bif2023/">This GitHub repo</a> has a maven project that allows you to setup, build and execute the jar file.</p><p>This is a sample of what the output would look like. This can then be pasted direcly to the tracker spreadsheet.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*H249XbQxlxcghW3DwPi5CQ.png" /></figure><h3>Future -&gt; Box Metadata Query UI</h3><p>The next step for the supporting the overall process would be to provide a UI based approach to viewing the applications and processing tasks. I also added an option to export the CSV file for the tracker instead of the Box.org admin team having to use the terminal to do this.</p><p>To achieve this, I build a prototype <a href="https://developer.box.com/guides/metadata/queries/">metadata query filter UI</a> using our <a href="https://developer.box.com/guides/embed/ui-elements/">Box UI elements</a>. Box metadata query API allows you to query for all files based on metadata criteria and allow filtering (via query parameters) which is used in this prototype. <a href="https://developer.box.com/guides/embed/ui-elements/">Box UI elements</a> are javascript widgets that provides easy access to Box functionality from custom applications. Check out these great articles for more info: <a href="https://medium.com/box-developer-blog/introducing-the-box-ui-elements-workshop-elevate-your-apps-user-experience-cfcbd05a0090">UI Elements workshop</a>, <a href="https://medium.com/box-developer-blog/getting-started-with-box-ui-elements-using-react-dfa1dffb4e12">UI Elements with React</a>, <a href="https://medium.com/box-developer-blog/working-with-box-metadata-queries-109b875a7301">Metadata Query API</a> and <a href="https://medium.com/box-developer-blog/metadata-view-in-box-content-explorer-4978e47e97e9">Metadata Query with UI Elements</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uo4O53hFFfWZ1wffDQ-lwg.png" /></figure><p>The prototype also provides functionality to export of the CSV directly from the interface rather than having to go the command line terminal to export. This is done by providing a button that when clicked will run the current query and export the results to a dynamically generated CSV file.</p><p>The buttons across the top will allow a user to filter on stage of the application — ‘Not Screened’, ’Rejected’, ’Second Stage’ and ‘Finalists’ and the results window provides direct preview the application videos and interact with the Box Relay tasks from the same window. This is useful when a user wants a quick overview by filtering the existing applications without opening the main GSheet tracker.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8B_x7fqAjZ_VLwDTZEm6cQ.png" /></figure><p>To get a metadata query to load in a UI element I define the metadata fields I want the query to return, the query definition itself and the fields I want the user to see in the app.</p><p>The fields can be both file properties and specific metadata fields from a single metadata template. In the below example “created_at”, “name” and “uploader_display_name” are basic file properties where as the fields starting with “metadata…” are metadata fields filled in by the applicant who submitted the application via the File Request. <em>(The EID is a reference to the unique ID of the Box instance the API is connecting to. You can get this from the Box developer console under your apps General Settings).</em></p><pre>fields=[<br>&quot;created_at&quot;,<br>&quot;name&quot;,<br>&quot;uploader_display_name&quot;,<br>&quot;metadata.enterprise_&lt;eid&gt;.boxImpactFundApplication.applicantName&quot;,<br>&quot;metadata.enterprise_&lt;eid&gt;.boxImpactFundApplication.approvalStage&quot;,&quot;metadata.enterprise_47757585.boxImpactFundApplication.organizationName&quot;,<br>&quot;metadata.enterprise_&lt;eid&gt;.boxImpactFundApplication.organisationCategory&quot;,<br>&quot;metadata.enterprise_&lt;eid&gt;.boxImpactFundApplication.totalBudgetFromLastYear&quot;,<br>&quot;metadata.enterprise_&lt;eid&gt;.boxImpactFundApplication.regions&quot;]</pre><p>The query definition looks like the below. It defines the metadata template to use, the query string , the folder to base the query in and the fields defined above.</p><pre>  mdQuery = {<br>    //The from field specifies the metadata template to query<br>    from: &quot;enterprise_&lt;eid&gt;.boxImpactFundApplication&quot;,<br>    //The query filters the results<br>    query: &quot;approvalStage1=:approvalStageArg&quot;,<br>    //Limit the number of results returned (more results can be fetched using marker based pagination)<br>    limit: 100,<br>    //The query parameters for the query filter - in this case approval stage<br>    query_params: {&quot;approvalStageArg&quot;:approvalStage},<br>    //The Box Folder id of the application folder<br>    ancestor_folder_id: &lt;folder to start the query from&gt;,<br>    //An array of fields to fetch <br>    fields: fields<br>};</pre><p>To get the UI element to show the results of the query I define which fields to show — note any field referenced here must be defined in the fields data above. Here I can add both file properties and metadata fields, provide display names and even allow inline editing of the fields. Not something this prototype requires but handy for lots of use cases.</p><pre>const fieldsToShow = [<br>  { key: &#39;created_at&#39;, displayName:&#39;Submission Date&#39;,canEdit: false },<br>  { key: &#39;uploader_display_name&#39;, displayName:&#39;Email&#39;,canEdit: false },<br>  { key: &#39;metadata.enterprise_&lt;eid&gt;.boxImpactFundApplication.applicantName&#39;,displayName:&#39;Applicant Name&#39;, canEdit: false },<br>  { key: &#39;metadata.enterprise_&lt;eid&gt;.boxImpactFundApplication.organizationName&#39;,displayName:&#39;Organization Name&#39;,  canEdit: false },<br>  { key: &#39;metadata.enterprise_&lt;eid&gt;.boxImpactFundApplication.organisationCategory&#39;,displayName:&#39;Organization Category&#39;,  canEdit: false },<br>  { key: &#39;metadata.enterprise_&lt;eid&gt;.boxImpactFundApplication.totalBudgetFromLastYear&#39;,displayName:&#39;Last years budget&#39;,  canEdit: false },<br>  { key: &#39;metadata.enterprise_&lt;eid&gt;.boxImpactFundApplication.regions&#39;,displayName:&#39;Regions&#39;,  canEdit: false },<br>];</pre><p>Putting the above parts together to make the display I use the Content Explorer UI element. This will normally display contents of a folder but by configuring the ‘defaultView’ to ‘metadata’ I can show the results of a metadata query instead of the contents of folder.</p><pre>const defaultView = &quot;metadata&quot;;<br>  contentExplorer.show(boxId, token, {<br>    container: &#39;#nav-container&#39;,<br>    metadataQuery: mdQuery,<br>    defaultView: defaultView,<br>    fieldsToShow:fieldsToShow,<br>    contentPreviewProps: {<br>        contentSidebarProps: {<br>            hasActivityFeed: true,<br>            hasMetadata: true<br>        }<br>    }</pre><p>Here is a link to the <a href="https://github.com/pchristensenB/box-metadata-query-view">repository in GitHub</a> with step by step instructions for setting up the page, the authentication and the web app integration feature.</p><h3>Putting it all together</h3><p>This flow shows how the process would look with the new features added where both Admins and Screener can use the custom app to access, review and process applications. Since there is logic in the Gsheet tracker around the scoring of applications I have left this as is for the last part of the process.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aOiNKdq3_7kMJly5vhl_XQ.png" /></figure><p>It was a pleasure working with the Box.org team to help them streamline their processes and hopefully I can improve the process even more for this year.</p><p><em>Thoughts? Comments? Feedback?</em></p><p><em>Drop us a line on our </em><a href="https://forum.box.com/"><em>community forum</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5dd16fce9747" width="1" height="1" alt=""><hr><p><a href="https://medium.com/box-developer-blog/lets-talk-about-using-box-platform-for-box-org-5dd16fce9747">Let’s talk about using Box Platform for Box.org</a> was originally published in <a href="https://medium.com/box-developer-blog">Box Developer Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Let’s talk about video bookmarking]]></title>
            <link>https://medium.com/box-developer-blog/lets-talk-about-video-bookmarking-864d5c68e3c0?source=rss-9bfce076b32f------2</link>
            <guid isPermaLink="false">https://medium.com/p/864d5c68e3c0</guid>
            <category><![CDATA[box-api]]></category>
            <category><![CDATA[development]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[video-bookmarker]]></category>
            <category><![CDATA[metadata]]></category>
            <dc:creator><![CDATA[Peter Christensen]]></dc:creator>
            <pubDate>Tue, 07 Nov 2023 13:00:15 GMT</pubDate>
            <atom:updated>2023-11-07T13:00:15.710Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1_jFfhwQ19VoQonOKuS6Hw.png" /></figure><p>Lots of customers upload videos to Box and Box offers a great preview experience for most video formats. Often customers want to direct the viewer to a certain time in the video and this is mostly done via email/Slack/Teams with with a given time for the viewer to jump to. Like this…</p><p><em>Check out the recording from our Q2 company all hands</em></p><ul><li><em>Intro from John: 0.12</em></li><li><em>Update from Finance Team: 3.32</em></li><li><em>Product news with Tim: 6.45</em></li><li><em>Quiz and fun time: 10.12</em></li></ul><p>This article shows a way of saving the times directly against the video in Box so all users can jump directly to the important parts of the video without having to find the email or Slack message with the timings. AI can obviously play a role here, but in this article I will show you how, with a simple integration, you can allow a user to manually add bookmarks to videos. So instead of having to find emails/Slack messages with a list of times users can see the bookmarks directly in Box and jump to the correct time in the video. Once the bookmarks have been set, any user previewing the video will have access to them and they can be updated directly on the file.</p><p>Here is an example of what it would look like for the end user when they access a video with bookmarks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/878/1*RhJip6oaNxsy6xVMYwy3EA.png" /></figure><h3>So how does it work?</h3><p>A <a href="https://developer.box.com/guides/skills/handle/metadata/">Box Skills Card</a> is a multimedia type display of metadata that can interact with the video previewer, meaning you can add time stamps to text and clicking on these will move the video replay to the given time. This is available for all users in Box but will only appear in the UI when the file in question has a SkillsCard saved in metadata.</p><p>What I will show in this article a single page <a href="https://developer.box.com/guides/applications/web-app-integrations/">OAuth 2.0 integration app</a> that will allow user to interact with the video to set bookmarks and save these back to the Skillscard using Box API. It consists of an authentication backend and a jquery/html front end.</p><h3>Backend</h3><p>In this example the backend is deployed as a NodeJs based <a href="https://docs.aws.amazon.com/lambda/latest/dg/welcome.html">AWS Lambda</a> function with a <a href="https://docs.aws.amazon.com/lambda/latest/dg/services-apigateway.html">public API gateway</a>, but the functionality is certainly not limited to AWS Lambda and you can use the application architecture that works for you. Here is <a href="https://medium.com/box-developer-blog/getting-started-with-box-node-js-sdk-with-oauth-2-0-5ca2e2e9c713">an example of using a Node server</a> and <a href="https://medium.com/box-developer-blog/getting-started-with-box-python-sdk-and-oauth-2-0-77607441170d">here a Python example</a> achieving the same thing.</p><p>The backend consists of a <a href="https://developer.box.com/guides/authentication/oauth2/">standard 3-legged OAuth code to token exchange</a>. This will take the OAuth2.0 auth code and exchange this into a token and a refresh token. The reason this is a backend process is that the token exchange requires a client secret which shouldn’t be publicly available.</p><p>Here is a sample of the OAuth2.0 code flow in an A<a href="https://docs.aws.amazon.com/lambda/latest/dg/nodejs-handler.html">WS Lambda function with a handler function</a></p><pre>const BoxSDK = require(&quot;box-node-sdk&quot;);<br><br>exports.handler = async function (event) {<br>  //Auth code from querystring<br>  const authCode = event.queryStringParameters.authCode;<br>  //Client ID from querystring<br>  const clientId = event.queryStringParameters.clientId;<br>  //Client secret that matches the client ID<br>  //Read from environment variable as an example<br>  let secret =process.env.BOX_APP_SECRET;<br>  var tokens;<br> <br>  var sdk = new BoxSDK({<br>    clientID: clientId,<br>    clientSecret: secret,<br>  });<br>  //Get the tokens from Box using the Auth code<br>  await sdk.getTokensAuthorizationCodeGrant(<br>    authCode, null, function (err, tokenInfo) {<br>      tokens = {<br>        token: tokenInfo.accessToken,<br>        refreshToken: tokenInfo.refreshToken<br>      };<br>    }<br>  );<br>  //Return the tokens to the caller<br>  const response = {<br>    statusCode: 200,<br>    headers: {<br>      &quot;Access-Control-Allow-Origin&quot;: &quot;*&quot;, // Required for CORS support to work<br>    },<br>    body: JSON.stringify(tokens),<br>  };<br>  return response;<br>};</pre><p>The token is then available for the front end, scoped to only be able to interact with the file the integration was invoked for.</p><p>This is what happens when the page is loaded. The page is loaded as a browser redirect once the user has authorized the app in Box. The URL will have an auth code in the query string parameters that can be exchanged to a token and this is what is passed to the backend function.</p><pre> $.ajax({<br>      method: &#39;get&#39;,<br>      //Use URL to above lambda function<br>      url:&quot;https://&lt;URL TO TOKEN EXCHANGE FUNCTION&gt;&quot;,<br>      //Data passed is coming from box as query string parameters<br>      //authCode, file ID and clientId<br>      data: { <br>        authCode: params.get(&#39;auth&#39;), <br>        id: params.get(&#39;id&#39;), <br>        clientId: params.get(&#39;clientId&#39;) },<br>      crossDomain: true,<br>      cache: false,<br>      //Show a loader gif while waiting for token<br>      beforeSend: function () {<br>        $(&#39;#loader&#39;).show();<br>        $(&quot;.container-fluid&quot;).hide();<br>      },<br>      //Show the main page on completion<br>      complete: function () {<br>        $(&#39;#loader&#39;).hide();<br>        $(&quot;.container-fluid&quot;).show();<br><br>      },<br>      success: function (response) {<br>       //Get the token from the lambda <br>        gaccessToken = response.token;<br>        //Load the existing bookmarks<br>        loadBookmarks();<br>        $(&quot;#preview-container&quot;).show();<br>        //Load video in the Box UI Element preview<br>        preview.show(boxFileId, boxAccessToken, {<br>          container: &#39;.preview-container&#39;,<br>          showDownload: false<br>        });<br>        preview.addListener(&#39;load&#39;, (data) =&gt; {<br>          //Get the duration of the video from the player<br>          //The duration must be sent as part of the skills card payload<br>          duration = preview.viewer.mediaEl.duration;<br>          $(&quot;#save-bookmark&quot;).prop(&#39;disabled&#39;, false);<br><br>        });</pre><h3>Front end</h3><p>The app is reached via the the ‘Integrations’ context menu in the Box Webapp for video files. More on how to configure this part later</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/628/1*2aW2XkySVsa_dTj4V3Q6Uw.png" /></figure><p>The invocation of the ‘Videobookmark’ integration will launch a screen like below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Fqwo4voIaoVrl7zleRDkww.png" /></figure><p>The front end in my example is a ‘simple’ HTML/Javascript page that loads the video preview, a control to add bookmarks and a list of existing bookmarks that also allows removal. Clicking on Save will save the bookmarks back to the file using <a href="https://developer.box.com/guides/metadata/instances/create/">Box Metadata API</a>.</p><p>When adding a bookmark the user needs to enter a time or simply start/stop the video at the place and the time will autopopulate. The end time will automatically be 10 seconds after the start but you can change this manually as well.</p><p>The bookmarks are saved in a <a href="https://developer.box.com/reference/resources/transcript-skill-card/">transcript card </a>which is part of the SkillsCard.</p><p>Getting the existing bookmarks is done by the below snippet using the <a href="https://developer.box.com/guides/metadata/instances/get/">Box Metadata API</a> to fetch the values from the SkillsCard and populating them in a list on the HTML page. The SkillsCard is accessible to all Box customers as a <a href="https://developer.box.com/guides/metadata/scopes/">global metadata template</a>. The SkillsCard is stored as a JSON structure in a metadata field called ‘cards’.</p><pre>function loadBookmarks() {<br>  //Call the Box metadata API to fetch the existing metadata<br>    $.ajax({<br>      method: &#39;get&#39;,<br>      url: &quot;https://api.box.com/2.0/files/&quot; + boxFileId + &quot;/metadata/global/boxSkillsCards&quot;,<br>      crossDomain: true,<br>      async: false,<br>      headers: {<br>        &quot;Authorization&quot;: &quot;Bearer &quot; + boxAccessToken},<br>      cache: false,<br>      success: function (response) {<br>        //Set the hasMetadata flag as the create and update calls are different<br>        hasMetadata=true;<br>        //Add the bookmarks to the page<br>        $.each(response.cards[0].entries, function (k, data) {<br>          //Each bookmark is added to an HTML list with some bootstrap styling<br>          $(&quot;.bookmarks&quot;).append(<br>            &quot;&lt;li uid=&quot; + i + &quot; id=v_&quot; + i + <br>            &quot; class=&#39;list-group-item d-flex justify-content-between align-items-center ital&#39; &quot; + <br>            &quot; bk=&#39;&quot; + data.text + &quot;&#39;&gt;&lt;span style=&#39;width:100px&#39;&gt;&quot; + data.text + &quot;&lt;/span&gt;&quot; + <br>            &quot;&lt;span id=&#39;start_&quot; + i + &quot;&#39; class=&#39;badge badge-primary badge-pill&#39;&gt;&quot; <br>            + fancyTimeFormat(data.appears[0].start) + &quot;&lt;/span&gt;&quot; + <br>            &quot;&lt;span id=&#39;end_&quot; + i + &quot;&#39; class=&#39;badge badge-warning badge-pill&#39;&gt;&quot; <br>            + fancyTimeFormat(data.appears[0].end) + &quot;&lt;/span&gt;&lt;span  class=&#39;badge badge-primary badge-pill remove&#39;&gt;x&lt;/span&gt;&lt;/li&gt;&quot;)<br>          i++;<br>        });<br>        //Add remove handler for the bookmark control<br>        $(&quot;.remove&quot;).click(function (event) {<br>          //Remove bookmark<br>          $(this).parent(&#39;li&#39;).removeClass(&#39;d-flex&#39;).hide(&#39;slow&#39;);<br>          //Show save button as a change was made<br>          $(&quot;#saveAll&quot;).show();<br>        });<br>      }<br><br>    });</pre><p>Resulting in this list on the page:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*ZAMr67vtR8H5n5Yy9ixZng.png" /></figure><p>Once bookmarks have been added/removed they can be saved back to the file using this code:</p><pre>function saveBookmarks(data,duration,hasBookmarks) {<br>    //Use put if bookmarks already exists, POST to create<br>    var method = hasBookmarks?&quot;PUT&quot;:&quot;POST&quot;;<br>    $.ajax({<br>      &quot;async&quot;: false,<br>      &quot;crossDomain&quot;: true,<br>      &quot;dataType&quot;: &quot;json&quot;,<br>      &quot;url&quot;:&quot;https://api.box.com/2.0/files/&quot;+boxFileId + &quot;/metadata/global/boxSkillsCards&quot;,<br>      //The input for create and update metadata are different so a transform method is used to format curretly based on <br>      //whether it is an update or a create<br>      &quot;data&quot;: transformData(data,duration,new Date().toISOString(),hasBookmarks), <br>      &quot;method&quot;: method,<br>      &quot;headers&quot;: {<br>        &quot;Authorization&quot;:&quot;Bearer &quot; + boxAccessToken,<br>        //The content type is different for update and create <br>        &quot;Content-Type&quot;:hasBookmarks?&quot;application/json-patch+json&quot;:&quot;application/json&quot;<br>      },<br>      success: function (response) {<br>        //Reset the bookmark adding controls <br>        //and enables regular control buttons after the save<br>       resetControls();<br>      }<br><br>    });</pre><p>The ‘transformData’ method simply formats the data based on whether I am <a href="https://developer.box.com/reference/put-files-id-metadata-id-id">updating</a> or <a href="https://developer.box.com/reference/post-files-id-metadata-id-id/">creating</a> the bookmarks. For the data I use a ‘skeleton skills card’ which has placeholders for the bookmarks data, the video duration and timestamp. The SkillsCard requires a certain format for the JSON structure so by using a <a href="https://github.com/pchristensenB/box-videobookmarking-demo/blob/main/bookmark.js#L12">skeleton card</a> I am ensuring the format.</p><pre>function transformData(data,duration,timeStamp,hasBookmarks) {<br>    if(hasBookmarks) {<br>        //For updates the format is json+patch. The &#39;cardBootStrapUpdate&#39;<br>        //contains a skeleton card with placeholders for data, duration and timestmp<br>        var card = cardBootstrapUpdate.format(data,duration,timeStamp);<br><br>        return &#39;[{&quot;op&quot;:&quot;replace&quot;,&quot;path&quot;:&quot;/cards/0&quot;,&quot;value&quot;:&#39; + card+&#39;}]&#39;;<br>    }<br>    else {<br>        //For create we create the entire card as payload. <br>        //The &#39;cardBootStrapCreate&#39;contains a skeleton card with placeholders for data, duration and timestmp<br>        return cardBootstrapCreate.format(JSON.stringify(data),duration,timeStamp);<br>        <br>    }<br>}</pre><p>Please find the full HTML page and javascript GitHub repository with some instructions on how to implement this yourself. <br><a href="https://github.com/pchristensenB/box-videobookmarking-demo">https://github.com/pchristensenB/box-videobookmarking-demo</a></p><h3>Configuring and enabling the integration</h3><p>To get the integration working in your Box environment there are a couple of steps</p><ol><li>Create the OAuth 2.0 app and the web integration using <a href="https://developer.box.com/guides/applications/web-app-integrations/configure/">this guide</a>:</li></ol><p>For application scopes for the OAuth 2.0 add read and write files and configure the Cors hosts with the web site host you are going to use</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*fSJ9P-csly4v6fYTitLGWQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*6x102QPeEB4gT2Qe2A6U9w.png" /></figure><p>For the web integration full permissions are required as we are updating the file and it only needs to be scoped to access to the file/folder it was invoked on.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pVAtIqi-eLmNXTQsHkEdnw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/848/1*LUGVW48dsSXZ_5Jg1NeAzA.png" /></figure><p>The Callback configuration should point to the web server where the single page app is deployed. This can be public or private but must be https. In this example the clientID of the OAuth 2.0 application is passed a parameter to the page and used in the OAuth flow to exchange the token.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/746/1*ufIOe1R5UZAgqJBU7AKOog.png" /></figure><p>Finally the visibility of the integration is set to ‘Online’. The integration will initially be available only for you as the developer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WAJ2TUyq9GBgLrE2rXTdbQ.png" /></figure><p>You can share it with others if the target group is small. To share, go to ‘Apps-&gt;My Apps’ from your main Box view and click on the ‘Videobookmark’ app (this is the name you gave the integration you configured above). From the bottom of the page you can copy a link and share with other users to enable the app on their instance.</p><p>If you want it more widely distributed, eg. to your entire org or other orgs, you can add it to <a href="https://developer.box.com/guides/applications/app-center/">the app center</a>.</p><p>Here is a link to a GitHub repo with all the code and instructions to set this up.</p><p><a href="https://github.com/pchristensenB/box-videobookmarking-demo">https://github.com/pchristensenB/box-videobookmarking-demo</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=864d5c68e3c0" width="1" height="1" alt=""><hr><p><a href="https://medium.com/box-developer-blog/lets-talk-about-video-bookmarking-864d5c68e3c0">Let’s talk about video bookmarking</a> was originally published in <a href="https://medium.com/box-developer-blog">Box Developer Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Let’s talk about events]]></title>
            <link>https://medium.com/box-developer-blog/lets-talk-about-events-61a5c62fb77c?source=rss-9bfce076b32f------2</link>
            <guid isPermaLink="false">https://medium.com/p/61a5c62fb77c</guid>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[box]]></category>
            <dc:creator><![CDATA[Peter Christensen]]></dc:creator>
            <pubDate>Thu, 20 Jul 2023 22:09:17 GMT</pubDate>
            <atom:updated>2023-07-20T22:09:17.234Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rOMRLguJ1IaLPqt4egDKiA.png" /></figure><p>I often talk to to customers with use cases that revolve around reacting to certain things happening in their Box instance. Eg. when a file is uploaded in a certain folder, when a collaboration is added to certain sensitive content, when a document is signed or even when a file is previewed they want to take further action. This can be anything from notifying another system to start or continue a workflow, to looking up and applying metadata in Box from a different source. Obviously the Box first-party applications already support user notifications for these scenarios so in this article I will outline some approaches to the backend automation side of this.</p><p>The automation of these scenarios normally present as one of two different approaches: Push and pull. Let’s checkout how each of these can work with Box and the pro and cons for each.</p><h3>Pull approaches</h3><p>Imagine a scenario where you need to notify another system when a file arrives in a specific folder in Box. This could be an important customer file that you need to act on straight away or perhaps as part of an integration to a CRM or case management system. A pull approach could be to poll the folder at a set frequency and check if any new documents had arrived since the last time you polled. This may seem relatively easy and straightforward and works well for small and well defined folder structures, but it doesn’t scale well…what if you had to poll thousands of folders or folders where access is restricted but you still need to react to certain updates. The time and API consumption would be prohibitive for this approach. Instead Box offers an event stream that allows you to listen for eg. file upload events and take action where appropriate as outlined in the below diagram</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*juaSOOlnO8lLRzjH" /></figure><p>There are a couple of different <a href="https://developer.box.com/guides/events/">event streams</a> in the Box API. A user event stream will provide all events for a given user, where the enterprise event stream will provide all events from the whole Box enterprise.</p><p>User Events are used by tools like Box Drive to ensure that a user’s Drive is always up to date with what’s happened in Box</p><p>The enterprise event stream API offers a <a href="https://developer.box.com/guides/events/parameters/stream-types/">variety of configuration options</a>. You can stream the logs in near real time or use historical lookups (the events for the last year are available from API) and limit by the type of event you want to poll.</p><p>Admin Events give you the same events as you’d get from running a historical report, and have some considerations with event timeliness vs ordering where Admin Streaming Events are great for near real-time lookups and reactionary use cases such as those tied to content security.</p><p>For example if you want to poll for all file upload events you can use this API and it will return a JSON array of events that you can process. Of course our <a href="https://github.com/box/sdks">Box SDK</a>s also have functions for handling the events from these streams.</p><pre>$ curl -i -X GET &quot;https://api.box.com/2.0/events?&quot; \<br>&quot;stream_type=admin_logs&quot; \<br>&quot;&amp;event_type=UPLOAD&quot; \<br>-H &quot;Authorization: Bearer ACCESS_TOKEN&quot;</pre><p>Considerations for events</p><ul><li>As Box logs all events in your enterprise you can end up with a lot of events to sift through so limiting the <a href="https://developer.box.com/reference/resources/event/#param-event_type">event types</a> to those that are required for the use case is important.</li><li>For custom applications, the polling interval will impact the number of API calls you make so be aware of this. Eg. if you make five calls to the event stream every five minutes, you would use over 10 mill API calls annually so there is a cost factor to be considered.</li></ul><h3>Push approaches</h3><p>Box also supports a push approach which means Box sends a notification when the event happens rather than you having to pull the event directly. The most common pattern for the push approach is the webhook pattern which is what we will focus on here. Webhooks are very much an industry standard in the SaaS world for driving event based architectures and for further technical deep dive on Box Webhooks I would recommend <a href="https://medium.com/box-developer-blog/hooked-on-the-box-platform-9264a0efb0a">this excellent article</a>.</p><p>Essentially a webhook is an event trigger that sits on Box platform. It can trigger based on a <a href="https://developer.box.com/guides/webhooks/triggers/">number of events</a> and will send an <a href="https://master--boxdev.netlify.app/guides/webhooks/handle/payload/">event payload </a>to pre-defined https endpoint that you control. The endpoint has to be publicly available as the event payload will come from the Box infrastructure so going this route does require that you can setup a public endpoint like a serverless function or similar.</p><p>For webhook security Box implements a <a href="https://developer.box.com/guides/webhooks/v2/signatures-v2/">signature verification system</a> that allows you confirm the request is coming from Box. In terms of serverless architecture <a href="https://aws.amazon.com/lambda/">AWS Lambda</a>, <a href="https://learn.microsoft.com/en-us/azure/azure-functions/functions-overview?pivots=programming-language-csharp">Azure Functions</a>, <a href="https://cloud.google.com/functions">GCP Cloud Functions</a> or <a href="https://vercel.com/">Vercel</a> all offer a platform to configure and deploy the required functionality and from there interact with or notify other systems.</p><p>Some use cases require business logic to respond to the webhook by making further API calls to Box. For example to update metadata, you might need to move content or collaborate users. This is perfectly possible, but it is important to note that the webhook payload does NOT carry any authentication information such as an API token. To execute Box API calls based on the webhook event you would still need to authenticate using one of Box’s server side authentication mechanisms — <a href="https://developer.box.com/guides/authentication/jwt/">JWT</a> or <a href="https://developer.box.com/guides/authentication/client-credentials/">Client Credentials Grant</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*44mP3UVjgoS0aK1B" /></figure><p>There is an exception to the above regarding the authentication as part of the payload. A ‘special’ type of Webhook that does carry authentication information called a ‘<a href="https://developer.box.com/guides/skills/">Box Skill</a>’. This can only be configured to fire on uploads, moves, or copies of documents and is specifically designed to allow the retrieval of external data and applying this as metadata to the uploaded document without having to authenticate to Box separately. Most common use cases for this is external database lookup to provide metadata or by using AI to analyze and extract rich insights from the document. For more info see t<a href="https://medium.com/box-developer-blog/box-skills-openai-api-tl-dr-summarization-tutorial-cfe205169198">his excellent article</a> where Alex Novotny shows how to add an AI generated summary to a document on upload.</p><p>The <a href="https://developer.box.com/sample-code/">Box Sample Code</a> catalog has some more good examples as well if you filter by Webhooks.</p><p>If you are interested in low code/no code solutions, cloud based integrators such as <a href="https://zapier.com/apps/box/integrations">Zapier</a> and <a href="https://www.workato.com/integrations/box">Workato</a> also make use of webhooks for a lot of their integrations with Box.</p><h4>Consideration for webhooks</h4><ul><li>If there is going to be heavy load on the webhook make sure the underlying infrastructure can manage it. Box will <a href="https://master--boxdev.netlify.app/guides/webhooks/handle/retries/">retry any webhook</a> that doesn’t respond with a 2xx http return code within 10 seconds. For webhooks where heavy loads are expected a queue implementation would be worth considering.</li><li>If the user who created the webhook is deleted from Box the webhook is also deleted so for production webhooks we recommend creating using a <a href="https://developer.box.com/guides/getting-started/user-types/service-account/">AutomationUser/Service Account</a> to create the webhook (Service accounts tends to stay longer than developers)</li></ul><h4>Common use cases for both approaches</h4><p>Below you can see a list of common use cases where developers can use events to drive business logic across different systems.</p><ul><li>Notification to external system when a customer or user has uploaded files in a shared folder, previewed files, signed document etc. I have worked with customers who need to update records in ERP or case management systems based off certain events in Box and a webhook approach is great for event based architectures like this.</li><li>Kick off downstream process when a partner/vendor uploads for example a spreadsheet of data into a shared Box folder. The data might have to be consumed by a reporting or BI platform and this can all be automated using events or webhooks.</li><li>Read metadata from external system and apply to Box folder or file on creation or after certain lifecycle events. For example an incoming invoice can be processed by an AI engine to extract important metadata, that is written to the file in Box and can be used to further drive downstream workflows.</li></ul><p>I hope this article has given some ideas on how to react to Box events from a developer perspective and given you enough ideas and further information on how to progress. As always you can engage with our API and Box development experts in our brand new <a href="https://forum.box.com/">developer forum</a>!</p><p>Happy coding.</p><h4>Resources</h4><p><a href="https://github.com/box-community/box-vercel-serverless-demo">Vercel/Box webhook demo</a></p><p><a href="https://developer.box.com/guides/events/">Events</a> guide</p><p><a href="https://developer.box.com/guides/webhooks/">Webhooks</a> guide</p><p><a href="https://github.com/box/box-node-sdk/blob/main/docs/events.md">Nodejs event stream code samples</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=61a5c62fb77c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/box-developer-blog/lets-talk-about-events-61a5c62fb77c">Let’s talk about events</a> was originally published in <a href="https://medium.com/box-developer-blog">Box Developer Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Let’s talk about Box app users]]></title>
            <link>https://medium.com/box-developer-blog/lets-talk-about-box-app-users-3ee3692c64f1?source=rss-9bfce076b32f------2</link>
            <guid isPermaLink="false">https://medium.com/p/3ee3692c64f1</guid>
            <category><![CDATA[design-patterns]]></category>
            <category><![CDATA[engage-app-users]]></category>
            <category><![CDATA[arcitecture]]></category>
            <category><![CDATA[box]]></category>
            <dc:creator><![CDATA[Peter Christensen]]></dc:creator>
            <pubDate>Tue, 20 Jun 2023 13:48:29 GMT</pubDate>
            <atom:updated>2023-06-20T13:48:29.964Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OXL-5b06VzxRFvUjOjOfxg.png" /></figure><p>I talk to a lot of customers who want to start using or expand use of Box for secure and easy collaboration with external users like partners, vendors, customers and contractors. Some are very happy to use Box ‘out of the box’ but others already have a significant investment in a custom experience for these users or a desire to provide it, and don’t want to introduce a separate app with yet another login for their users.</p><p>With the <a href="https://developer.box.com/guides/getting-started/user-types/app-users/">Box Platform app user</a> concept we can provide the full scale of Box Content capabilities seamlessly and without the user having to login to Box (or even be aware that Box is the content layer!). This means that you can ‘bring your own tech’ when it comes to digital experience, web-site management and identity management and Box will seamlessly integrate.</p><p>After reading this article you should come away with a good understanding of what app users are, how they can be used, how to manage identity mapping, how and when to create app users and how applications that utilize app users can be architected.</p><h3>So how does it work…</h3><p>An app user is a Box user that can only access Box via the API. That means you are in full control over how and where content is surfaced to your end users, and by using app users you make sure that you can easily control and monitor content permissions and actions on a user level and have full auditability on actions taken by those users. So in terms of access to the capabilities of Box there is no difference between a traditional ‘managed user’ who can access box.com with a login and an app user. The difference is only how they each access (and how they are licensed, but more about this towards the end of the article).</p><p>A great example would be a vendor or customer portal where secure content collaboration is needed between a set of internal users and a larger and more fluid population of external users whose access is via a custom branded portal. You can find a portal example that has app users in <a href="https://github.com/box-community/ui-elements-sample-app">this</a> sample code repository. Below is also an architecture diagram of a portal deployment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*IWA9RxrS-Z0TzGJ2.png" /><figcaption>Web portal architecture diagram example</figcaption></figure><p>Since app users can only access Box via API you will need to either build the experience or integrate the Box API into an existing experience such as a website, mobile app or line of business application and use it to power the content experience part of the solution.</p><h4>Identity</h4><p>Some customers already have an identity management system in use, some will need to choose one but Box app users can work with pretty much any type of identity management system. To integrate Box app users with these, the approach is to create a unique mapping between the user in the identity system (think AD, Okta, Auth0, Ping and similar) and the Box app user. So when the application has established and confirmed the identity of the user, the interaction with the Box API as the app user can be established as well.</p><p>The mapping can be as shown below using the ‘external_app_user_id’ attribute on the <a href="https://developer.box.com/reference/resources/user/">Box user object</a> to map to the unique user id in the identity management system. This is useful for situations where it is not possible or meaningful to change the user model in the underlying identity management system to reflect the mapping.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*OVD5P8bkw8pdFLH4" /><figcaption>Mapping from IDMS to Box</figcaption></figure><p>Alternatively the unique Box user id can be saved in a custom attribute on the user object in the identity management system as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*vCU61jYEGCIvucCa" /><figcaption>Mapping from Box to IDMS</figcaption></figure><p>Often customers will actually map the attributes both ways to make sure that the link between the users can be established regardless of where the application logic reads from first. In some situations the second option can be viewed as the best because it eliminates one extra API call to find the correct user in Box as the actual ID is already known.</p><h4>Considerations for creating app users</h4><p>Box App users can only be<a href="https://developer.box.com/guides/users/create-app-user/"> created via Box API</a> and there are different approaches to when to create them:</p><ul><li><strong>Pre-creation</strong>. This is useful if there is an existing process by which users are created in the identity management system. This could be a batch process or as part of an onboarding process where scripting could be used. <a href="https://developer.box.com/guides/cli/">Box CLI</a> and the <a href="https://developer.box.com/sdks-and-tools/">Box SDKs</a> are great tools for these types of processes.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*hH5G8Eu1i3OE9zGj" /></figure><ul><li><strong>Creation on registration. </strong>This covers scenarios where users can self-register to a service that has Box as a content layer or where there are different distributed services that can create users. As part of the user creation process a Box app user is created and granted the appropriate rights and permissions.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*tFZkNxr0GrQNMKDG" /></figure><ul><li><strong>Lazy/just-in-time creation. </strong>This is useful where only a subset of users actually need to access and interact with the content stored in Box. Instead of creating a Box app users for all users upfront, you wait until the user makes a choice to access content for the first time and create the app user then. Subsequent requests for content will then use the created user.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/951/0*dDo7f8buCRDt88x1" /></figure><h4>Providing access to content</h4><p>As part of creating the app user it is a common requirement to provide access to certain content or add the user to specific groups for access. This can all be done via API once the user has been created and will often follow the business logic of the parent application. Eg. creating a shared folder between customer and advisor for a banking vault solution or giving the user access to certain case folders in case management system. Box has a well-defined and granular <a href="https://support.box.com/hc/en-us/articles/360043697254-Understanding-Folder-Permissions">security model</a> for this purpose.</p><h4>Application design</h4><p>A common pattern we see customers use is a model where external users (customers, partners, vendors etc.) access content via a custom portal experience using app users to connect them to Box. This portal could have information from other systems as well and can be branded accordingly. Internal users in this pattern are using Box as their regular content management platform but can also have secure collaboration with the portal users. Using <a href="https://developer.box.com/guides/embed/ui-elements/">Box UI elements</a> for the portal UI is a great way to speed up development of the content part of the portal. Check out <a href="https://medium.com/box-developer-blog/getting-started-with-box-ui-elements-using-react-dfa1dffb4e12">this react example</a> for more details</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/0*a-Gtl-mEZPZ6B_et.png" /></figure><p>Another pattern frequently adopted by customers use a model whereby all users, both internal and external, access content via a custom application experience and are represented by app users. This works well in situations where the same parent application is used by both internal and external users and box can integrate into this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/0*SQd16xk7pyznTD-i.png" /></figure><h4>Backend uses of app users</h4><p>So far I have focussed on how app users are used to represent external users such as partners, contractors and customers in different direct user experiences. But app users are also frequently used for backend processes that link Box to other systems or to solve some specific requirements within Box. They are well suited for this as they do not have to represent a specific user and as nobody can login to a user interface as the app user, the threat surface and potential for human error is greatly reduced. App users can be used as content owners where eg. separate ownership is required due to content being stored in <a href="https://www.box.com/en-gb/zones">Box Zones</a> or to horizontally scale bulk processes that otherwise could run into <a href="https://developer.box.com/guides/api-calls/permissions-and-errors/rate-limits/">Box API user based rate limits</a>.</p><p><strong>Quick word on licensing<br></strong><em>It is important to note that app users are licensed differently than what we normally refer to as ‘managed users’ — users that can login to box.com via web, mobile or desktop. App users are licensed on a consumption model which means you only pay for active users and their API consumption (measured monthly) as opposed to ‘managed users’ which are licensed on a traditional seat model. For customers this means that using an app user model is good for scaling up to serve very large user populations where only a percentage of users interact with content on a monthly basis.</em></p><h4>How to get started.</h4><p>Have a look at the <a href="https://developer.box.com/guides/getting-started/user-models/">user models guide</a> and the <a href="https://developer.box.com/guides/getting-started/user-types/">user types</a>. Create your first app user with our <a href="https://developer.box.com/reference/post-users/">API</a>. Also check out this easy to follow <a href="https://developer.box.com/guides/sso-identities-and-app-users/connect-okta-to-app-users/">Okta sample</a> that integrates Okta identity management with Box Platform app users. For further reading here are links to working demos for <a href="https://box-auth0-sandpit.herokuapp.com/">Auth0</a>, <a href="https://box-azureb2c-sandpit.herokuapp.com/">AzureB2C</a>,<a href="https://box-cognito-sandpit.herokuapp.com/"> AWS Cognito</a> and <a href="https://box-okta-sandpit.herokuapp.com/">Okta</a> each mapping a user to a Box app user, showing diagrams for login and registration and each have a link to a GitHub repository.</p><p>…And as always, feel free to post questions on our <a href="https://forum.box.com/">developer forum</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3ee3692c64f1" width="1" height="1" alt=""><hr><p><a href="https://medium.com/box-developer-blog/lets-talk-about-box-app-users-3ee3692c64f1">Let’s talk about Box app users</a> was originally published in <a href="https://medium.com/box-developer-blog">Box Developer Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Let’s talk about integrating Box]]></title>
            <link>https://medium.com/box-developer-blog/lets-talk-about-integrating-box-6258891d95c4?source=rss-9bfce076b32f------2</link>
            <guid isPermaLink="false">https://medium.com/p/6258891d95c4</guid>
            <category><![CDATA[content-management]]></category>
            <category><![CDATA[box-platform]]></category>
            <category><![CDATA[integration]]></category>
            <category><![CDATA[api]]></category>
            <dc:creator><![CDATA[Peter Christensen]]></dc:creator>
            <pubDate>Wed, 19 Oct 2022 14:19:15 GMT</pubDate>
            <atom:updated>2022-10-19T14:19:15.912Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nqQurOzvLlfF79J-A9w7Eg.png" /></figure><p>As part of my job as a Platform Solutions Engineer at Box, I often hear developers and customers ask something like “…how can I integrate Box with my application…”, “…how can I surface Box content to my end users in my custom app…” , or “..can the Box API integrate with &lt;&lt;insert framework, identity management provider or other system here&gt;&gt;…”</p><p>In this article, I will outline the most common approaches to surface Box content to users in custom apps and integrations, outline the advantages and challenges with the different approaches, and discuss use cases they address. There will also be plenty of links to resources for deeper dives, GitHub repositories and code samples for those of you who wants to try it yourselves.</p><p>Before I start discussing how we can build integrations with Box, I should mention that Box actually offers about <a href="https://www.box.com/en-gb/integrations">1500 pre-built</a> integrations, so a lot of customers will find what they need there. These integrations are designed to be configured easily by a non-developer, and the most popular integrations are Slack, Teams, Office 365, and NetSuite to name a few. These integrations are not the focus of this article but a good starting point to understand what type of integrations already exist.</p><p>In this section, I will start with the most common API driven integrations and towards the end I will show some of the ways you can integrate a Box experience directly without coding, using features available in the box.com application.</p><h3>Box UI Elements</h3><p><a href="https://developer.box.com/guides/embed/ui-elements/">Box UI elements</a> are where most developers start when looking at integrating Box with custom applications that have a user interface. These are React based javascript widgets that can work with most websites. Since they are loaded directly in your code, they can be interacted with to drive further functionality on the websites via a series of client side events. They are <a href="https://opensource.box.com/box-ui-elements">open source</a>, and the source is available on <a href="https://github.com/box/box-ui-elements">GitHub</a>. They are developed and maintained by Box, as well as distributed via <a href="https://www.npmjs.com/package/box-ui-elements">npm</a>.</p><p>A UI Element ‘only’ needs an access token and the Box identifier of the Box file or folder involved, the rest is managed by the widget. See <a href="https://medium.com/box-developer-blog/getting-started-with-box-ui-elements-using-react-dfa1dffb4e12">this excellent post</a> about how to get started with UI Elements and React or <a href="https://medium.com/box-developer-blog/using-box-ui-elements-and-python-sdk-part-1-922f47299fd">this</a> for UI elements and Python.</p><p>The most common UI element is the <a href="https://developer.box.com/guides/embed/ui-elements/explorer/">content explorer</a> which can be used to represent a Box folder in a custom application. It allows the user to navigate, upload, download and preview (while respecting user permissions) in a completely white labelled way if required.</p><p>So this code snippet…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/928/1*IEn0I-oDs9weTycw3eC0xw.png" /></figure><p>…could look like this in a portal environment…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*W4qufpSN4Ae0wvf87ZlSkw.png" /><figcaption>Content Explorer element in custom page</figcaption></figure><p>…opening a document would bring up the <a href="https://developer.box.com/guides/embed/ui-elements/preview/">unique Box Previewer</a>…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-fySy2y5itn8W8L6y5Q5Rw.png" /><figcaption>Preview UI element</figcaption></figure><p>UI Elements also contain a <a href="https://developer.box.com/guides/embed/ui-elements/picker/">content picker</a> where users can select files or folders allowing integrations into wizard or step-by-step type features where a Box file or folder is part of the data flow. Finally there is an <a href="https://developer.box.com/guides/embed/ui-elements/uploader/">upload widget</a>, allowing users to upload content only.</p><p><strong>Common use cases:</strong></p><ul><li>Secure Document Vault where eg. bank customers can store, retrieve and collaborate on sensitive and secure documents. See <a href="https://www.box.com/en-gb/customers/morgan-stanley">this case study for Morgan Stanley</a>.</li><li>Customer/vendor/contractor portals where the secure exchange and collaboration on documents is a central feature. <a href="https://www.box.com/en-gb/customers/broadcom">See this case study for Broadcom</a>.</li><li>Loan application or onboarding scenarios where Box can be used as a single content layer avoiding content sprawl through different systems and email. <a href="https://www.box.com/en-gb/customers/maxwell">See this case study </a>for Maxwell.</li><li>Presenting Box content in Salesforce Digital Experiences. This works well in conjunction with our standard <a href="https://www.box.com/en-gb/partners/salesforce">Box for Salesforce c</a>omposite app. Check out <a href="https://github.com/kylefernandadams/box-canvas-app">this GitHub</a> repository to get started. <a href="https://www.box.com/en-gb/customers/town-of-cary">Also see this case study</a> for the Town of Cary.</li></ul><p><strong>Advantages</strong></p><ul><li>Quick time to market</li><li>Once UI Element are loaded on the client, all traffic including upload/download goes from the client to Box saving both CPU and network resources for the application host.</li><li>UI Elements are maintained by Box so fixes and new features are added regularly.</li><li>The preview UI Element allows preview of over <a href="https://support.box.com/hc/en-us/articles/360043695794-Viewing-Different-File-Types-Supported-in-Box-Content-Preview">140 formats</a> without the need for plugins thus avoiding time consuming downloads and allowing a more secure document sharing approach (such as preview only permissions and watermarking)</li><li>Works with any existing identity provider. See working examples for <a href="https://box-auth0-sandpit.herokuapp.com/">Auth0</a>, <a href="https://box-okta-sandpit.herokuapp.com/">Okta</a>, <a href="https://box-cognito-sandpit.herokuapp.com/">Cognito</a> and <a href="https://box-azureb2c-sandpit.herokuapp.com/">AzureB2C</a></li></ul><p><strong>Challenges</strong></p><ul><li>UI elements is designed for speed of implementation so overall style and functionality is mostly fixed.</li></ul><h3><strong>Box REST API/Box SDK</strong></h3><p>The <a href="https://developer.box.com/reference/">Box REST API</a> allows a developer to access all Box content services which means that if a they need to expose content to users in a custom application it is all there. Built on top of the API are the <a href="https://developer.box.com/sdks-and-tools/">Box SDKs</a>, built and maintained by Box SDK Engineers and covering the most popular programming languages, as well as iOS and Android for mobile development. So a developer can present the same list of files as in the above UI Element example, but using another UI approach like <a href="https://datatables.net/">Data Tables</a> or even a <a href="https://www.jstree.com/">Tree View</a> just by using the ‘<a href="https://developer.box.com/reference/get-folders-id-items/">folder items API</a>’ and their favorite language or direct REST calls.</p><p>Below is an example of using Data Tables to show the same list of files from the previous example including a piece of custom metadata I have added to the documents (Document Type). The API approach gives greater flexibility in terms of interacting with and displaying information and using preferred UI frameworks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KdqJw8u5Y6tnLvPR9mq8Aw.png" /><figcaption>Data Table example</figcaption></figure><p><a href="https://gist.github.com/pchristensenB/691b52a769a51994ba6aa246c388d6c4">Here is a sample you can try</a></p><p>Here is another example where a tree view has been created from the output of the Box API and integrated with the Box Previewer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iIPR_WItljrSsA24EsRBxQ.png" /><figcaption>Tree View example</figcaption></figure><p><a href="https://gist.github.com/pchristensenB/65761f2bec3c10a330be66be624f2476">Here is sample you can try</a></p><p><strong>Common use cases:</strong></p><ul><li>The use cases are basically the same as listed for UI elements</li></ul><p><strong>Advantages</strong></p><ul><li>Using API and Box SDKs gives the developer the choice of UI framework and ability to be very precise around the design and display.</li><li>Works with any existing identity provider. See working examples for <a href="https://box-auth0-sandpit.herokuapp.com/">Auth0</a>, <a href="https://box-okta-sandpit.herokuapp.com/">Okta</a>, <a href="https://box-cognito-sandpit.herokuapp.com/">Cognito</a> and <a href="https://box-azureb2c-sandpit.herokuapp.com/">AzureB2C</a></li></ul><p><strong>Challenges</strong></p><ul><li>Normally requires more development effort than using UI Elements.</li></ul><p>Of course the Box API, Box SDKs and <a href="https://developer.box.com/guides/cli/">Box CLI</a> can also be used to drive integrations where there is no direct user interaction required and it is primarily a question of automation and machine to machine interaction.</p><blockquote><strong>Authentication</strong></blockquote><blockquote>Couple of words about authentication. The Box API supports two ways of API authentication: <a href="https://developer.box.com/guides/authentication/oauth2/">Client side 3-legged OAuth</a> and server side authentication with <a href="https://developer.box.com/guides/authentication/jwt/">JWT</a> or <a href="https://developer.box.com/guides/authentication/client-credentials/">Client Credentials Grant</a>. The client side authentication is great when the users accessing the API integration are already Box users with a Box login. For scenarios where Box API is being surfaced in applications where users have already logged in via another identity management system, server side authentication works well as it avoids the user having to login twice as their user authentication would be orchestrated via API. <a href="https://developer.box.com/guides/getting-started/user-models/">Read more about user models</a> and our <a href="https://developer.box.com/guides/getting-started/user-types/app-users/">app user concept</a> which will allow you to integrate Box with any identity management provider easily. (This will be the focus of a future article…let’s talk about app users)</blockquote><p>In this part I will cover some of the ways you can integrate Box without necessarily using the API. These are options offered in our main Box Web experience.</p><h3>Box Embed</h3><p>For customers who already use Box and want to embed a certain Box folder or file into the user experience of another app, we offer an <a href="https://support.box.com/hc/en-us/articles/360043695434-Create-a-Box-Embed-Widget">embed widget</a> that can be generated directly from the UI or the <a href="https://developer.box.com/guides/embed/box-embed/">API</a>. This type of embed can be configured to be open for all or require the user to authenticate and has some configuration options. The embed widget basically exposes part of the box.com experience in an iframe.</p><p>From box.com a user can configure the widget</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/523/1*4geHAJcRUXgB5_v8gktoEw.png" /></figure><p>Add the embed code to a web page</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*us0F7Jp-id_BYBSVFrLfyg.png" /><figcaption>Iframe embed code</figcaption></figure><p>End result is a folder embedded in the portal</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u9WtXNz2atS_gJVanfKjug.png" /><figcaption>Sample portal with Box Embed</figcaption></figure><p><strong>Common use cases:</strong></p><ul><li>Showing a folder of common documents in another context such as HR portal, public internet or another application</li><li>Showing a folder of project documents in project management portal</li></ul><p><strong>Advantages</strong></p><ul><li>Requires no coding to create and configure</li><li>Includes most common Box Content functionality — browse, view, upload, download, search, commenting, tasks etc.</li></ul><p><strong>Challenges</strong></p><ul><li>Iframe embed approach means little scope for client side interaction with the embedded component mainly due to cross site scripting limitations</li><li>Little scope for changing look and feel of the embedded component as it is always loaded from box.com and currently does not offer 100% with the user experience in box.com</li><li>Either the content must have has open access or it requires that users have a Box account to access it.</li></ul><h3>Box File Request</h3><p>With <a href="https://support.box.com/hc/en-us/articles/360045304813-Using-File-Request-to-get-Content-from-Anyone">Box File Request</a> users can create an upload page with some configuration (including logo, colors and option for mandatory metadata) to email directly to users or embed in a website. The page can be created from the Box UI or can be copied from existing File Request via <a href="https://developer.box.com/guides/file-requests/">API</a>. Anyone with the link can then upload documents but do NOT have to authenticate to Box unless specified in the configuration.</p><p>From box.com a user can configure a file request on a folder</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/457/1*7-3_5mCXZkgauO2t4w7anw.png" /></figure><p>Add the link to an iframe on the site</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*davhbRfCmOwexbcifPoZtA.png" /></figure><p>End result is a Box File Request embedded in the portal</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D7fTfHALQUTvs9A3FLpSJQ.png" /></figure><p><strong>Use cases</strong></p><ul><li>Getting documents from transient users, eg. onboarding documents, documents from partners/contractors, public evidence gathering portals for law enforcement</li><li>Uploads that require mandatory metadata</li></ul><p><strong>Advantages</strong></p><ul><li>Requires no coding to create and configure and no login for end users</li><li>Integrates nicely with <a href="https://support.box.com/hc/en-us/articles/360051287373-Starting-Relay-Workflows-Automatically-with-File-Request">Box Relay</a></li></ul><p><strong>Challenges</strong></p><ul><li>Iframe embed approach means little scope for client side interaction with the embedded component mainly due to cross site scripting limitations</li></ul><h4>Finally</h4><p>Thanks for reading this far. I hope you now have a good understanding of how Box can be integrated into your apps. I have peppered links to valuable resources throughout the article but as ever a great place to start is <a href="https://developer.box.com/">developer.box.com</a>. Enjoy the journey and see you next time for a deep dive on app users and why they are great.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6258891d95c4" width="1" height="1" alt=""><hr><p><a href="https://medium.com/box-developer-blog/lets-talk-about-integrating-box-6258891d95c4">Let’s talk about integrating Box</a> was originally published in <a href="https://medium.com/box-developer-blog">Box Developer Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>