> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.dropboxapi.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.dropboxapi.com/_mcp/server.

# Get Thumbnail v2

POST https://content.dropboxapi.com/2/files/get_thumbnail_v2

Get a thumbnail for an image. This method currently supports files with the following file
 extensions: jpg, jpeg, png, tiff, tif, gif, webp, ppm and bmp. Photos that are larger than
 20MB in size won't be converted to a thumbnail.

**Required scope:** `files.content.read`

**Endpoint format:** [Content-download](https://docs.dropboxapi.com/dropbox-api/docs/technical-reference/request-response-formats#content-download-endpoints)

**Authentication:** [App](https://docs.dropboxapi.com/dropbox-api/docs/auth-types#app-authentication), [User](https://docs.dropboxapi.com/dropbox-api/docs/auth-types#user-authentication), [Dropbox-API-Select-Admin (Whole Team)](https://docs.dropboxapi.com/dropbox-api/docs/auth-types#admin-authentication-via-dropbox-api-select-admin)

Reference: https://docs.dropboxapi.com/dropbox-api/api-reference/user-endpoints/files/get-thumbnail-v-2

## Authentication

- `Authorization` header (bearer token, required) — App-level OAuth 2.0 token (no user context). Use `Authorization: Bearer <token>`. Obtain by calling the token endpoint with `grant_type=client_credentials`. Only available on endpoints that declare app auth support.
- `Authorization` header (bearer token, required) — OAuth 2.0 token issued to a specific user. Use `Authorization: Bearer <token>`. Public clients should use the authorization code flow with PKCE (S256). For background or offline access, send `token_access_type=offline` during authorization and use the returned refresh token to obtain new access tokens. You can generate a short-lived access token from the App Console; see [Testing with a generated token](https://docs.dropboxapi.com/dropbox-api/docs/oauth#testing-with-a-generated-token).

## Request

### Headers

- `Dropbox-API-Select-User` (string, optional) — Acts on behalf of a team member for supported user-auth operations. Pass a team member ID such as `dbmid:...`. When used with a team token, that token must also include the `team_data.member` scope.
- `Dropbox-API-Select-Admin` (string, optional) — Acts as the specified team admin for supported user-auth operations. Pass a team member ID for an admin account. When used with a team token, that token must also include the `team_data.member` scope.
- `Dropbox-API-Path-Root` (string, optional) — Scopes path-based operations to a namespace (root). The value is a JSON serialization of the `common.PathRoot` union: `{".tag": "home"}`, `{".tag": "root", "root": "<namespace_id>"}`, or `{".tag": "namespace_id", "namespace_id": "<namespace_id>"}`. On failure the request returns 422 with a `common.PathRootError`.
- `Dropbox-API-Arg` (object, required) — JSON-encoded arguments. Non-ASCII characters and 0x7F must use JSON \uXXXX escape sequences to be HTTP-header-safe.
  - `resource` (object or object, required) — Information specifying which file to preview. This could be a path to a file, a shared link pointing to a file, or a shared link pointing to a folder, with a relative path.
    - files.PathOrLink.path
      - `.tag` (enum, required)
        - Allowed values: `path`
      - `path` (string, required, nullable)
    - files.PathOrLink.link
      - `.tag` (enum, required)
        - Allowed values: `link`
      - `url` (string, required) — The shared link corresponding to either a file or shared link to a folder. If it is for a folder shared link, we use the path param to determine for which file in the folder the view is for.
      - `password` (string, optional, nullable) — Password for the shared link. Required for password-protected shared links to files unless it can be read from a cookie.
      - `path` (string, optional, nullable) — The path corresponding to a file in a shared link to a folder. Required for shared links to folders.
  - `exclude_media_info` (boolean, optional, nullable) — Normally, `FileMetadata.media_info` is set for photo and video. When this flag is true, `FileMetadata.media_info` is not populated. This improves latency for use cases where `media_info` is not needed.
  - `format` (object or object or object, optional, nullable) — The format for the thumbnail image, jpeg (default), png, or webp. For images that are photos, jpeg should be preferred, while png is better for screenshots and digital arts, and web for compression.
    - files.ThumbnailFormat.jpeg
      - `.tag` (enum, required)
        - Allowed values: `jpeg`
    - files.ThumbnailFormat.png
      - `.tag` (enum, required)
        - Allowed values: `png`
    - files.ThumbnailFormat.webp
      - `.tag` (enum, required)
        - Allowed values: `webp`
  - `mode` (object or object or object or object, optional, nullable) — How to resize and crop the image to achieve the desired size.
    - files.ThumbnailMode.strict
      - `.tag` (enum, required)
        - Allowed values: `strict`
    - files.ThumbnailMode.bestfit
      - `.tag` (enum, required)
        - Allowed values: `bestfit`
    - files.ThumbnailMode.fitone_bestfit
      - `.tag` (enum, required)
        - Allowed values: `fitone_bestfit`
    - files.ThumbnailMode.original
      - `.tag` (enum, required)
        - Allowed values: `original`
  - `size` (object or object or object or object or object or object or object or object or object, optional, nullable) — The size for the thumbnail image.
    - files.ThumbnailSize.w32h32
      - `.tag` (enum, required)
        - Allowed values: `w32h32`
    - files.ThumbnailSize.w64h64
      - `.tag` (enum, required)
        - Allowed values: `w64h64`
    - files.ThumbnailSize.w128h128
      - `.tag` (enum, required)
        - Allowed values: `w128h128`
    - files.ThumbnailSize.w256h256
      - `.tag` (enum, required)
        - Allowed values: `w256h256`
    - files.ThumbnailSize.w480h320
      - `.tag` (enum, required)
        - Allowed values: `w480h320`
    - files.ThumbnailSize.w640h480
      - `.tag` (enum, required)
        - Allowed values: `w640h480`
    - files.ThumbnailSize.w960h640
      - `.tag` (enum, required)
        - Allowed values: `w960h640`
    - files.ThumbnailSize.w1024h768
      - `.tag` (enum, required)
        - Allowed values: `w1024h768`
    - files.ThumbnailSize.w2048h1536
      - `.tag` (enum, required)
        - Allowed values: `w2048h1536`

## Response

### 200

Successful response

- File download.

## Errors

### 401 Unauthorized Error

Bad or expired token

- `error` (object or object or object or object or object or object or object or object, required) — Errors occurred during authentication.
  - auth_apiv2.AuthError.invalid_access_token
    - `.tag` (enum, required)
      - Allowed values: `invalid_access_token`
  - auth_apiv2.AuthError.invalid_select_user
    - `.tag` (enum, required)
      - Allowed values: `invalid_select_user`
  - auth_apiv2.AuthError.invalid_select_admin
    - `.tag` (enum, required)
      - Allowed values: `invalid_select_admin`
  - auth_apiv2.AuthError.user_suspended
    - `.tag` (enum, required)
      - Allowed values: `user_suspended`
  - auth_apiv2.AuthError.expired_access_token
    - `.tag` (enum, required)
      - Allowed values: `expired_access_token`
  - auth_apiv2.AuthError.missing_scope
    - `.tag` (enum, required)
      - Allowed values: `missing_scope`
    - `required_scope` (string, required) — The required scope to access the route.
  - auth_apiv2.AuthError.route_access_denied
    - `.tag` (enum, required)
      - Allowed values: `route_access_denied`
  - Other
    - `.tag` (string, optional)
- `error_summary` (string, required) — A human-readable summary of the error.

### 403 Forbidden Error

The user or team account doesn't have access to the endpoint or feature

- `error` (object or object or object or object or object, required) — Error occurred because the account doesn't have permission to access the resource.
  - auth_apiv2.AccessError.invalid_account_type
    - `.tag` (enum, required)
      - Allowed values: `invalid_account_type`
    - `invalid_account_type` (object or object or object, required)
      - auth_apiv2.InvalidAccountTypeError.endpoint
        - `.tag` (enum, required)
          - Allowed values: `endpoint`
      - auth_apiv2.InvalidAccountTypeError.feature
        - `.tag` (enum, required)
          - Allowed values: `feature`
      - Other
        - `.tag` (string, optional)
  - auth_apiv2.AccessError.paper_access_denied
    - `.tag` (enum, required)
      - Allowed values: `paper_access_denied`
    - `paper_access_denied` (object or object or object, required)
      - auth_apiv2.PaperAccessError.paper_disabled
        - `.tag` (enum, required)
          - Allowed values: `paper_disabled`
      - auth_apiv2.PaperAccessError.not_paper_user
        - `.tag` (enum, required)
          - Allowed values: `not_paper_user`
      - Other
        - `.tag` (string, optional)
  - auth_apiv2.AccessError.team_access_denied
    - `.tag` (enum, required)
      - Allowed values: `team_access_denied`
  - auth_apiv2.AccessError.no_permission
    - `.tag` (enum, required)
      - Allowed values: `no_permission`
    - `no_permission` (object or object, required)
      - auth_apiv2.NoPermissionError.unauthorized_account_id_usage
        - `.tag` (enum, required)
          - Allowed values: `unauthorized_account_id_usage`
        - `unauthorized_account_ids` (list of string, required) — The account IDs that the caller does not have permission to use.
      - Other
        - `.tag` (string, optional)
  - Other
    - `.tag` (string, optional)
- `error_summary` (string, required) — A human-readable summary of the error.

### 409 Conflict Error

Endpoint-specific error

- `error` (object or object or object or object or object or object or object or object, required)
  - files.ThumbnailV2Error.path
    - `.tag` (enum, required)
      - Allowed values: `path`
    - `path` (object or object or object or object or object or object or object or object, required)
      - files.LookupError.malformed_path
        - `.tag` (enum, required)
          - Allowed values: `malformed_path`
        - `malformed_path` (string, required, nullable)
      - files.LookupError.not_found
        - `.tag` (enum, required)
          - Allowed values: `not_found`
      - files.LookupError.not_file
        - `.tag` (enum, required)
          - Allowed values: `not_file`
      - files.LookupError.not_folder
        - `.tag` (enum, required)
          - Allowed values: `not_folder`
      - files.LookupError.restricted_content
        - `.tag` (enum, required)
          - Allowed values: `restricted_content`
      - files.LookupError.unsupported_content_type
        - `.tag` (enum, required)
          - Allowed values: `unsupported_content_type`
      - files.LookupError.locked
        - `.tag` (enum, required)
          - Allowed values: `locked`
      - Other
        - `.tag` (string, optional)
  - files.ThumbnailV2Error.unsupported_extension
    - `.tag` (enum, required)
      - Allowed values: `unsupported_extension`
  - files.ThumbnailV2Error.unsupported_image
    - `.tag` (enum, required)
      - Allowed values: `unsupported_image`
  - files.ThumbnailV2Error.encrypted_content
    - `.tag` (enum, required)
      - Allowed values: `encrypted_content`
  - files.ThumbnailV2Error.conversion_error
    - `.tag` (enum, required)
      - Allowed values: `conversion_error`
  - files.ThumbnailV2Error.access_denied
    - `.tag` (enum, required)
      - Allowed values: `access_denied`
  - files.ThumbnailV2Error.not_found
    - `.tag` (enum, required)
      - Allowed values: `not_found`
  - Other
    - `.tag` (string, optional)
- `error_summary` (string, required) — A human-readable summary of the error.
- `user_message` (object, optional)
  - `locale` (string, optional)
  - `text` (string, optional)

### 429 Too Many Requests Error

The app is making too many requests for the given user or team and is being rate limited. The app should wait for the number of seconds specified in the "Retry-After" response header before trying again.

- `error` (object, required) — Error occurred because the app is being rate limited.
  - `reason` (object or object or object, required) — The reason why the app is being rate limited.
    - auth_apiv2.RateLimitReason.too_many_requests
      - `.tag` (enum, required)
        - Allowed values: `too_many_requests`
    - auth_apiv2.RateLimitReason.too_many_write_operations
      - `.tag` (enum, required)
        - Allowed values: `too_many_write_operations`
    - Other
      - `.tag` (string, optional)
  - `retry_after` (uint64, optional, default: 1) — The number of seconds that the app should wait before making another request.
- `error_summary` (string, required) — A human-readable summary of the error.

### 500 Internal Server Error

Internal server error. An error occurred on the Dropbox servers. Check https://status.dropbox.com/ for announcements about Dropbox service issues.

- `any`

## Examples

**SDK Code**

```python
import requests

url = "https://content.dropboxapi.com/2/files/get_thumbnail_v2"

headers = {
    "Dropbox-API-Arg": "{\"format\":{\".tag\":\"jpeg\"},\"resource\":{\".tag\":\"path\",\"path\":\"/a.docx\"}}",
    "Authorization": "Bearer <token>"
}

response = requests.post(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://content.dropboxapi.com/2/files/get_thumbnail_v2';
const options = {
  method: 'POST',
  headers: {
    'Dropbox-API-Arg': '{"format":{".tag":"jpeg"},"resource":{".tag":"path","path":"/a.docx"}}',
    Authorization: 'Bearer <token>'
  }
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://content.dropboxapi.com/2/files/get_thumbnail_v2"

	req, _ := http.NewRequest("POST", url, nil)

	req.Header.Add("Dropbox-API-Arg", "{\"format\":{\".tag\":\"jpeg\"},\"resource\":{\".tag\":\"path\",\"path\":\"/a.docx\"}}")
	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://content.dropboxapi.com/2/files/get_thumbnail_v2")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Dropbox-API-Arg"] = '{"format":{".tag":"jpeg"},"resource":{".tag":"path","path":"/a.docx"}}'
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://content.dropboxapi.com/2/files/get_thumbnail_v2")
  .header("Dropbox-API-Arg", "{\"format\":{\".tag\":\"jpeg\"},\"resource\":{\".tag\":\"path\",\"path\":\"/a.docx\"}}")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://content.dropboxapi.com/2/files/get_thumbnail_v2', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Dropbox-API-Arg' => '{"format":{".tag":"jpeg"},"resource":{".tag":"path","path":"/a.docx"}}',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://content.dropboxapi.com/2/files/get_thumbnail_v2");
var request = new RestRequest(Method.POST);
request.AddHeader("Dropbox-API-Arg", "{\"format\":{\".tag\":\"jpeg\"},\"resource\":{\".tag\":\"path\",\"path\":\"/a.docx\"}}");
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Dropbox-API-Arg": "{\"format\":{\".tag\":\"jpeg\"},\"resource\":{\".tag\":\"path\",\"path\":\"/a.docx\"}}",
  "Authorization": "Bearer <token>"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://content.dropboxapi.com/2/files/get_thumbnail_v2")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```