---
title: "Get Oauth2 Dropbox Tokens"
method: POST
path: "/v2/gen-ai/oauth2/dropbox/tokens"
tags: ["DigitalOcean-public.v2-new_GradientAI Platform"]
---

# Get Oauth2 Dropbox Tokens

`POST /v2/gen-ai/oauth2/dropbox/tokens`

To obtain the refresh token, needed for creation of data sources, send a GET request to `/v2/gen-ai/oauth2/dropbox/tokens`. Pass the code you obtrained from the oauth flow in the field 'code'

## Request body

- ApiDropboxOauth2GetTokensInput — The oauth2 code from google
  - `code` string — The oauth2 code from google
  - `redirect_url` string — Redirect url

## Response `200`

A successful response.

- ApiDropboxOauth2GetTokensOutput — The dropbox oauth2 token and refresh token
  - `refresh_token` string — The refresh token
  - `token` string — The access token

## Other responses

- `401` — Authentication failed due to invalid credentials.
- `404` — The resource was not found.
- `429` — The API rate limit has been exceeded.
- `500` — There was a server error.
- `default` — There was an unexpected error.

---

[API](https://skmtc.net/digitalocean/apis/digitalocean-api.md) · [All operations](https://skmtc.net/digitalocean/apis/digitalocean-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/digitalocean/digitalocean-api/revisions/cb3bf9b21459/schema)
