# @codingfingers/next-dropbox

> Tools for using Dropbox API in your NextJS app

Latest version **0.0.3** (published 2023-03-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install @codingfingers/next-dropbox
pnpm add @codingfingers/next-dropbox
yarn add @codingfingers/next-dropbox
bun add @codingfingers/next-dropbox
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2023-03-11 |
| First published | 2023-03-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 24.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Tomáš Bedrník |
| Maintainers | tbedrnik |
| Keywords | nextjs, dropbox |

## Links

- npm: https://www.npmjs.com/package/@codingfingers/next-dropbox
- Repository: https://github.com/tbedrnik/next-dropbox-toolkit
- Homepage: https://github.com/tbedrnik/next-dropbox-toolkit#readme
- Issues: https://github.com/tbedrnik/next-dropbox-toolkit/issues
- npm.io page: https://npm.io/package/@codingfingers/next-dropbox

## Dependencies (1)

- [raw-body](https://npm.io/package/raw-body.md) ^2.5.2

## Recent versions

- 0.0.3 (latest) — 2023-03-11
- 0.0.2 — 2023-03-10
- 0.0.1 — 2023-03-10

## README

# NextJS + Dropbox API tools

Tools for using some of Dropbox API in your NextJS app. List files from any folder on your static page and benefit from automatic revalidation based on Dropbox webhooks.

## Environment variables

| Variable name           | Description                  |
| ----------------------- | ---------------------------- |
| `DROPBOX_APP_KEY`       | Your app's key               |
| `DROPBOX_APP_SECRET`    | Your app's secret            |
| `DROPBOX_REFRESH_TOKEN` | Never-expiring refresh token |

## Creating a Dropbox app

TODO: Write docs for app creation

## Obtaining refresh token

1. Replace the variable in the link below with your app's key and visit the URL in a browser:

```
https://www.dropbox.com/oauth2/authorize?client_id=<DROPBOX_APP_KEY>&token_access_type=offline&response_type=code
```

2. Authorize the app access and copy the `<ACCESS_CODE>`
3. Replace variables in the `curl` request below:

```
curl --location --request POST 'https://api.dropboxapi.com/oauth2/token' \
-u '<DROPBOX_APP_KEY>:<DROPBOX_APP_SECRET>' \
-H 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'code=<ACCESS_CODE>' \
--data-urlencode 'grant_type=authorization_code'
```

4. Execute the command and copy the `refresh_token`

---
_Source: https://npm.io/package/@codingfingers/next-dropbox · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
