Skip to content

Box ​

Box is a cloud file sharing and content management app. Protocol Launcher allows you to generate mobile links to open Box folders, files, and shared links.

Usage ​

There are two ways to use this library:

  • On-Demand import from subpaths enables tree-shaking and keeps bundles small.
  • Full Import from the root package is convenient but includes all app modules.

Pick On-Demand for production builds; Full Import is fine for quick scripts or demos.

Select Installation Method

On-Demand
Recommended. Optimized for production.
Full Import
Convenient. Good for quick scripts.

URL Methods ​

Box's official mobile deep linking documentation lists deep links for folder, file, and shared-link objects in Box and Box for EMM. This module exposes only those documented forms.

Open Folder ​

Generate the documented URL that opens a folder object in the Box mobile app.

On-Demand
ts
import { openFolder } from 'protocol-launcher/box'

const url = openFolder({
  id: '123456789',
})

Open File ​

Generate the documented URL that opens a file object in the Box mobile app.

On-Demand
ts
import { openFile } from 'protocol-launcher/box'

const url = openFile({
  id: '987654321',
})

Generate the documented URL that opens a shared link in the Box mobile app.

On-Demand
ts
import { openSharedLink } from 'protocol-launcher/box'

const url = openSharedLink({
  url: 'https://app.box.com/s/shared-link-id',
})

Open EMM Folder ​

Generate the documented URL that opens a folder object in Box for EMM.

On-Demand
ts
import { openEmmFolder } from 'protocol-launcher/box'

const url = openEmmFolder({
  id: '123456789',
})

Open EMM File ​

Generate the documented URL that opens a file object in Box for EMM.

On-Demand
ts
import { openEmmFile } from 'protocol-launcher/box'

const url = openEmmFile({
  id: '987654321',
})

Generate the documented URL that opens a shared link in Box for EMM.

On-Demand
ts
import { openEmmSharedLink } from 'protocol-launcher/box'

const url = openEmmSharedLink({
  url: 'https://app.box.com/s/shared-link-id',
})

Generated URLs ​

ts
openFolder({ id: '123456789' })
// => 'boxapp://folder?id=123456789'

openFile({ id: '987654321' })
// => 'boxapp://file?id=987654321'

openSharedLink({ url: 'https://app.box.com/s/shared-link-id' })
// => 'boxapp://sharedlink?url=https%3A%2F%2Fapp.box.com%2Fs%2Fshared-link-id'

openEmmFolder({ id: '123456789' })
// => 'boxemm://folder?id=123456789'

openEmmFile({ id: '987654321' })
// => 'boxemm://file?id=987654321'

openEmmSharedLink({ url: 'https://app.box.com/s/shared-link-id' })
// => 'boxemm://sharedlink?url=https%3A%2F%2Fapp.box.com%2Fs%2Fshared-link-id'

Official Documentation ​