# Short links and file pickers

URL: https://qrdx.dev/docs/short-links-and-file-pickers
Source: https://github.com/qrdxinc/qrdx/blob/main/apps/docs/content/docs/short-links-and-file-pickers.mdx

Shorten a QR code's link with your own Bitly, Rebrandly or Short.io account, or encode a Dropbox share link, straight from the QR editor.

Connected accounts let the QR editor use links that live in your other tools: a short link you manage in Bitly, Rebrandly or Short.io, or a share link to a file in Dropbox or another cloud drive. The QR code encodes that link, so you keep the tool you already use. Use this when your links must stay in that tool's analytics, or when the code should open a file you keep in a cloud drive.

**Every plan**

Connected accounts belong to your user account and work on every plan. If you'd rather keep the destination editable in QRdx itself, with scan analytics, use a [dynamic QR code](https://qrdx.dev/docs/dynamic-qr-codes) instead.

## How it works [#how-it-works]

Connect an account in [Settings → Integrations](https://qrdx.dev/settings/integrations) and it shows up in the QR editor's **URL** type, in the **Use a link from…** menu beside the **Website address** field. Under **Your accounts**, each service says what it does:

- **Shorten**: Bitly, Rebrandly or Short.io. Create a link under **Create new**, or pick one you already have under **Use existing**. The QR code encodes that short link, so you can change where it points later in that service, and it counts the clicks.
- **File**: Dropbox. Browse or search, then pick a file or folder. QRdx creates the item's share link and the QR code encodes it.

The same menu lists your other connected content sources, such as payment and booking links. Services you haven't connected yet are behind **Connect an account** at the bottom of the menu.

![The Use a link from… menu of the playground's URL form, listing the connected services a link can be picked from.](https://qrdx.dev/docs-static/shots/use-a-link-from.light.webp)

Tokens and API keys are stored encrypted, and you can disconnect at any time.

## Short links [#short-links]

| Service | How you connect | Domains | Back-half |
| --- | --- | --- | --- |
| Bitly | Sign in with Bitly, or paste a generic access token (Settings → Developer settings → API) | bit.ly and your branded domains | Picked by Bitly |
| Rebrandly | Paste an API key (Account → API keys) | rebrand.ly and your branded domains | Your own slashtag, or random |
| Short.io | Paste a secret API key (Integrations & API → API) | Your Short.io domains | Your own path, or random |

Each integration's settings page shows your domains and lets you pick the default one for new links. You can still pick another domain per link.

**Changing a destination later**

QRdx creates the link; editing where it points happens in Bitly, Rebrandly or Short.io. Bitly only lets paid plans change a link's destination.

## File pickers [#file-pickers]

**Dropbox** encodes a shared link (created, or the existing one reused). Anyone with the link can open it, unless your team only allows team links.

When the link can't be opened by everyone, QRdx says so right after you pick, so a printed code doesn't send people to a sign-in page.

### Files on hosted pages [#files-on-hosted-pages]

Hosted pages can use cloud files too: the PDF, audio, video and download blocks get a **From Dropbox** button next to the upload button when Dropbox is your only connected drive, or **From cloud storage** when you have connected more than one. For Dropbox, page blocks get a direct link to the file, so audio and video players and the PDF viewer can load it.

## Disconnecting [#disconnecting]

Disconnecting deletes the stored token. For Dropbox, QRdx also revokes it with the service. For Bitly, Rebrandly and Short.io, delete the key in that service too if you no longer use it.

QR codes you already made keep working: they hold the short link or share link, not your token.

## Limits and plans [#limits-and-plans]

Connected accounts have no plan limit of their own. The links they create are static from QRdx's point of view: QRdx neither counts their scans nor can change where they point. Each service's own plan decides what you can do with the link there.

## Self-hosting [#self-hosting]

Rebrandly and Short.io need nothing on the server. The others need an app in each service, with its client ID and secret in the environment; without them the integration is hidden in production (local development shows a **Needs setup** badge). Bitly still works without them, through pasted access tokens.

| Integration | Variables | Redirect URI |
| --- | --- | --- |
| Bitly (sign-in) | `BITLY_CLIENT_ID`, `BITLY_CLIENT_SECRET` | `<app url>/api/integrations/bitly/callback` |
| Dropbox | `DROPBOX_CLIENT_ID`, `DROPBOX_CLIENT_SECRET` | `<app url>/api/integrations/dropbox/callback` |
| OneDrive | `MICROSOFT_CLIENT_ID`, `MICROSOFT_CLIENT_SECRET` | `<app url>/api/integrations/onedrive/callback` |
| Box | `BOX_CLIENT_ID`, `BOX_CLIENT_SECRET` | `<app url>/api/integrations/box/callback` |
| Notion | `NOTION_CLIENT_ID`, `NOTION_CLIENT_SECRET` | `<app url>/api/integrations/notion/callback` |

`<app url>` is `http://localhost:3000` in development and your production URL otherwise. Every integration also needs `INTEGRATION_ENCRYPTION_KEY` in production, which encrypts stored tokens and keys.

Scopes to request:

- **Dropbox:** `account_info.read`, `files.metadata.read`, `sharing.read`, `sharing.write`
- **OneDrive:** `offline_access`, `Files.ReadWrite` (Microsoft Graph needs write access to create sharing links)
- **Box:** Read and write all files and folders (`root_readwrite`)
- **Bitly, Notion:** no scopes; Notion asks the user which pages to share

See [Self-hosting](https://qrdx.dev/docs/self-hosting#optional-services).

## Related [#related]

- [Dynamic QR codes](https://qrdx.dev/docs/dynamic-qr-codes): editable, tracked links inside QRdx
- [Move from Bitly, Rebrandly and others](https://qrdx.dev/docs/migrate): bring existing links over instead
- [Files](https://qrdx.dev/docs/files): upload files to QRdx itself
