> 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.

# List Folder

POST https://api.dropboxapi.com/2/files/list_folder
Content-Type: application/json

Starts returning the contents of a folder. If the result's `ListFolderResult.has_more`
 field is true, call [list_folder/continue](api:dropbox-api:POST/2/files/list_folder/continue) with the returned ListFolderResult.cursor to
 retrieve more entries. If you're using ListFolderArg.recursive set to true to keep a local
 cache of the contents of a Dropbox account, iterate through each entry in order and process
 them as follows to keep your local state in sync: For each FileMetadata, store the new entry
 at the given path in your local state. If the required parent folders don't exist yet, create
 them. If there's already something else at the given path, replace it and remove all its
 children. For each FolderMetadata, store the new entry at the given path in your local state.
 If the required parent folders don't exist yet, create them. If there's already something else
 at the given path, replace it but leave the children as they are. Check the new entry's
 FolderSharingInfo.read_only and set all its children's read-only statuses to match. For each
 DeletedMetadata, if your local state has something at the given path, remove it and all its
 children. If there's nothing at the given path, ignore this entry. Note: auth.RateLimitError
 may be returned if multiple [list_folder](api:dropbox-api:POST/2/files/list_folder) or [list_folder/continue](api:dropbox-api:POST/2/files/list_folder/continue) calls with same parameters
 are made simultaneously by same API app for same user. If your app implements retry logic,
 please hold off the retry until the previous request finishes.

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

**Endpoint format:** [RPC](https://docs.dropboxapi.com/dropbox-api/docs/technical-reference/request-response-formats#rpc-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/list-folder

## 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`.

### Body (application/json)

This endpoint expects an object.

- `path` (string, required) — A unique identifier for the file.
- `include_deleted` (boolean, optional, default: false) — If true, the results will include entries for files and folders that used to exist but were deleted.
- `include_has_explicit_shared_members` (boolean, optional, default: false) — If true, the results will include a flag for each file indicating whether or not that file has any explicit members.
- `include_mounted_folders` (boolean, optional, default: true) — If true, the results will include entries under mounted folders which includes app folder, shared folder and team folder.
- `include_non_downloadable_files` (boolean, optional, default: true) — If true, include files that are not downloadable, i.e. Google Docs.
- `include_property_groups` (object, optional, nullable) — If set to a valid list of template IDs, `FileMetadata.property_groups` is set if there exists property data associated with the file and each of the listed templates.
  - file_properties.TemplateFilterBase.filter_some
    - `.tag` (enum, required)
      - Allowed values: `filter_some`
    - `filter_some` (list of string, required)
- `include_restorable_info` (boolean, optional, default: false) — If true, each returned deleted entry will include whether that entry can be restored.
- `limit` (uint, optional, nullable) — The maximum number of results to return per request. Note: This is an approximate number and there can be slightly more entries returned in some cases.
- `recursive` (boolean, optional, default: false) — If true, the list folder operation will be applied recursively to all subfolders and the response will contain contents of all subfolders. In some cases, setting `ListFolderArg.recursive` to `true` may lead to performance issues or errors, especially when traversing folder structures with a large number of items. A workaround for such cases is to set `ListFolderArg.recursive` to `false` and traverse subfolders one at a time.
- `shared_link` (object, optional, nullable) — A shared link to list the contents of. If the link is password-protected, the password must be provided. If this field is present, `ListFolderArg.path` will be relative to root of the shared link. Only non-recursive mode is supported for shared link.
  - `url` (string, required) — Shared link url.
  - `password` (string, optional, nullable) — Password for the shared link.
- `include_media_info` (boolean, optional, default: false, deprecated) — If true, `FileMetadata.media_info` is set for photo and video. This parameter will no longer have an effect starting December 2, 2019.

## Response

### 200

Successful response

- `cursor` (string, required) — Pass the cursor into [list_folder/continue](api:dropbox-api:POST/2/files/list_folder/continue) to see what's changed in the folder since your previous query.
- `entries` (list of object or object or object, required) — The files and (direct) subfolders in the folder.
  - files.Metadata.file
    - `.tag` (enum, required)
      - Allowed values: `file`
    - `name` (string, required) — The last component of the path (including extension). This never contains a slash.
    - `client_modified` (datetime, required) — For files, this is the modification time set by the desktop client when the file was added to Dropbox. Since this time is not verified (the Dropbox server stores whatever the desktop client sends up), this should only be used for display purposes (such as sorting) and not, for example, to determine if a file has changed or not.
    - `id` (string, required) — A unique identifier for the file.
    - `rev` (string, required) — A unique identifier for the current revision of a file. This field is the same rev as elsewhere in the API and can be used to detect changes and avoid conflicts.
    - `server_modified` (datetime, required) — The last time the file was modified on Dropbox.
    - `size` (uint64, required) — The file size in bytes.
    - `path_display` (string, optional, nullable) — The cased path to be used for display purposes only. In rare instances the casing will not correctly match the user's filesystem, but this behavior will match the path provided in the Core API v1, and at least the last path component will have the correct casing. Changes to only the casing of paths won't be returned by [list_folder/continue](api:dropbox-api:POST/2/files/list_folder/continue). This field will be null if the file or folder is not mounted.
    - `path_lower` (string, optional, nullable) — The lowercased full path in the user's Dropbox. This always starts with a slash. This field will be null if the file or folder is not mounted.
    - `preview_url` (string, optional, nullable) — The preview URL of the file.
    - `content_hash` (string, optional, nullable) — A hash of the file content. This field can be used to verify data integrity. For more information see our [Content hash](https://www.dropbox.com/developers/reference/content-hash) page.
    - `export_info` (object, optional, nullable) — Information about format this file can be exported to. This filed must be set if `is_downloadable` is set to false.
      - `export_as` (string, optional, nullable) — Format to which the file can be exported to.
      - `export_options` (list of string, optional, nullable) — Additional formats to which the file can be exported. These values can be specified as the export_format in /files/export.
    - `file_lock_info` (object, optional, nullable) — If present, the metadata associated with the file's current lock.
      - `created` (datetime, optional, nullable) — The timestamp of the lock was created.
      - `is_lockholder` (boolean, optional, nullable) — True if caller holds the file lock.
      - `lockholder_account_id` (string, optional, nullable) — The account ID of the lock holder if known.
      - `lockholder_name` (string, optional, nullable) — The display name of the lock holder.
    - `has_explicit_shared_members` (boolean, optional, nullable) — This flag will only be present if include_has_explicit_shared_members is true in [list_folder](api:dropbox-api:POST/2/files/list_folder) or [get_metadata](api:dropbox-api:POST/2/files/get_metadata). If this flag is present, it will be true if this file has any explicit shared members. This is different from sharing_info in that this could be true in the case where a file has explicit members but is not contained within a shared folder.
    - `is_downloadable` (boolean, optional, default: true) — If true, file can be downloaded directly; else the file must be exported.
    - `is_restorable` (boolean, optional, nullable) — If present, indicates whether this file revision can be restored.
    - `media_info` (object or object, optional, nullable) — Additional information if the file is a photo or video. This field will not be set on entries returned by [list_folder](api:dropbox-api:POST/2/files/list_folder), [list_folder/continue](api:dropbox-api:POST/2/files/list_folder/continue), or [get_thumbnail_batch](api:dropbox-api:POST/2/files/get_thumbnail_batch), starting December 2, 2019.
      - files.MediaInfo.pending
        - `.tag` (enum, required)
          - Allowed values: `pending`
      - files.MediaInfo.metadata
        - `.tag` (enum, required)
          - Allowed values: `metadata`
        - `metadata` (object or object, required)
          - files.MediaMetadata.photo
            - `.tag` (enum, required)
            - `dimensions` (object, optional, nullable) — Dimension of the photo/video.
            - `location` (object, optional, nullable) — The GPS coordinate of the photo/video.
            - `time_taken` (datetime, optional, nullable) — The timestamp when the photo/video is taken.
          - files.MediaMetadata.video
            - `.tag` (enum, required)
            - `dimensions` (object, optional, nullable) — Dimension of the photo/video.
            - `location` (object, optional, nullable) — The GPS coordinate of the photo/video.
            - `time_taken` (datetime, optional, nullable) — The timestamp when the photo/video is taken.
            - `duration` (uint64, optional, nullable) — The duration of the video in milliseconds.
    - `property_groups` (list of object, optional, nullable) — Additional information if the file has custom properties with the property template specified.
      - `fields` (list of object, required) — The actual properties associated with the template. There can be up to 32 property types per template.
        - `name` (string, required) — Key of the property field associated with a file and template. Keys can be up to 256 bytes.
        - `value` (string, required) — Value of the property field associated with a file and template. Values can be up to 1024 bytes.
      - `template_id` (string, required) — A unique identifier for the associated template.
    - `sharing_info` (object, optional, nullable) — Set if this file is contained in a shared folder.
      - `parent_shared_folder_id` (any, required) — ID of shared folder that holds this file.
      - `read_only` (boolean, required) — True if the file or folder is inside a read-only shared folder.
      - `modified_by` (string, optional, nullable) — The last user who modified the file. This field will be null if the user's account has been deleted.
    - `symlink_info` (object, optional, nullable) — Set if this file is a symlink.
      - `target` (string, required) — The target this symlink points to.
    - `parent_shared_folder_id` (any, optional, nullable, deprecated) — Please use `FileSharingInfo.parent_shared_folder_id` or `FolderSharingInfo.parent_shared_folder_id` instead.
  - files.Metadata.folder
    - `.tag` (enum, required)
      - Allowed values: `folder`
    - `name` (string, required) — The last component of the path (including extension). This never contains a slash.
    - `id` (string, required) — A unique identifier for the folder.
    - `path_display` (string, optional, nullable) — The cased path to be used for display purposes only. In rare instances the casing will not correctly match the user's filesystem, but this behavior will match the path provided in the Core API v1, and at least the last path component will have the correct casing. Changes to only the casing of paths won't be returned by [list_folder/continue](api:dropbox-api:POST/2/files/list_folder/continue). This field will be null if the file or folder is not mounted.
    - `path_lower` (string, optional, nullable) — The lowercased full path in the user's Dropbox. This always starts with a slash. This field will be null if the file or folder is not mounted.
    - `preview_url` (string, optional, nullable) — The preview URL of the file.
    - `property_groups` (list of object, optional, nullable) — Additional information if the file has custom properties with the property template specified. Note that only properties associated with user-owned templates, not team-owned templates, can be attached to folders.
      - `fields` (list of object, required) — The actual properties associated with the template. There can be up to 32 property types per template.
        - `name` (string, required) — Key of the property field associated with a file and template. Keys can be up to 256 bytes.
        - `value` (string, required) — Value of the property field associated with a file and template. Values can be up to 1024 bytes.
      - `template_id` (string, required) — A unique identifier for the associated template.
    - `sharing_info` (object, optional, nullable) — Set if the folder is contained in a shared folder or is a shared folder mount point.
      - `read_only` (boolean, required) — True if the file or folder is inside a read-only shared folder.
      - `no_access` (boolean, optional) — Specifies that the folder cannot be accessed by the user.
      - `parent_shared_folder_id` (any, optional, nullable) — Set if the folder is contained by a shared folder.
      - `shared_folder_id` (any, optional, nullable) — If this folder is a shared folder mount point, the ID of the shared folder mounted at this location.
      - `traverse_only` (boolean, optional) — Specifies that the folder can only be traversed and the user can only see a limited subset of the contents of this folder because they don't have read access to this folder. They do, however, have access to some sub folder.
    - `parent_shared_folder_id` (any, optional, nullable, deprecated) — Please use `FileSharingInfo.parent_shared_folder_id` or `FolderSharingInfo.parent_shared_folder_id` instead.
    - `shared_folder_id` (any, optional, nullable, deprecated) — Please use `sharing_info` instead.
  - files.Metadata.deleted
    - `.tag` (enum, required)
      - Allowed values: `deleted`
    - `name` (string, required) — The last component of the path (including extension). This never contains a slash.
    - `path_display` (string, optional, nullable) — The cased path to be used for display purposes only. In rare instances the casing will not correctly match the user's filesystem, but this behavior will match the path provided in the Core API v1, and at least the last path component will have the correct casing. Changes to only the casing of paths won't be returned by [list_folder/continue](api:dropbox-api:POST/2/files/list_folder/continue). This field will be null if the file or folder is not mounted.
    - `path_lower` (string, optional, nullable) — The lowercased full path in the user's Dropbox. This always starts with a slash. This field will be null if the file or folder is not mounted.
    - `preview_url` (string, optional, nullable) — The preview URL of the file.
    - `is_restorable` (boolean, optional, nullable) — If present, indicates whether this deleted entry can be restored.
    - `parent_shared_folder_id` (any, optional, nullable, deprecated) — Please use `FileSharingInfo.parent_shared_folder_id` or `FolderSharingInfo.parent_shared_folder_id` instead.
- `has_more` (boolean, required) — If true, then there are more entries available. Pass the cursor to [list_folder/continue](api:dropbox-api:POST/2/files/list_folder/continue) to retrieve the rest.

## 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, required)
  - files.ListFolderError.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.ListFolderError.template_error
    - `.tag` (enum, required)
      - Allowed values: `template_error`
    - `template_error` (object or object or object, required)
      - file_properties.TemplateError.template_not_found
        - `.tag` (enum, required)
          - Allowed values: `template_not_found`
        - `template_not_found` (string, required, nullable) — Core data types
      - file_properties.TemplateError.restricted_content
        - `.tag` (enum, required)
          - Allowed values: `restricted_content`
      - Other
        - `.tag` (string, optional)
  - 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

**Request**

```json
{
  "path": "/Homework/math",
  "recursive": false
}
```

**Response**

```json
{
  "cursor": "ZtkX9_EHj3x7PMkVuFIhwKYXEpwpLwyxp9vMKomUhllil9q7eWiAu",
  "entries": [
    {
      ".tag": "file",
      "client_modified": "2015-05-12T15:50:38Z",
      "content_hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
      "file_lock_info": {
        "created": "2015-05-12T15:50:38Z",
        "is_lockholder": true,
        "lockholder_name": "Imaginary User"
      },
      "has_explicit_shared_members": false,
      "id": "id:a4ayc_80_OEAAAAAAAAAXw",
      "is_downloadable": true,
      "name": "Prime_Numbers.txt",
      "path_display": "/Homework/math/Prime_Numbers.txt",
      "path_lower": "/homework/math/prime_numbers.txt",
      "property_groups": [
        {
          "fields": [
            {
              "name": "Security Policy",
              "value": "Confidential"
            }
          ],
          "template_id": "ptid:1a5n2i6d3OYEAAAAAAAAAYa"
        }
      ],
      "rev": "a1c10ce0dd78",
      "server_modified": "2015-05-12T15:50:38Z",
      "sharing_info": {
        "modified_by": "dbid:AAH4f99T0taONIb-OurWxbNQ6ywGRopQngc",
        "parent_shared_folder_id": "84528192421",
        "read_only": true
      },
      "size": 7212
    },
    {
      ".tag": "file",
      "client_modified": "2024-01-15T09:30:00Z",
      "id": "id:a4ayc_80_OEAAAAAAAAAXz",
      "name": "math",
      "path_display": "/Homework/math",
      "path_lower": "/homework/math",
      "property_groups": [
        {
          "fields": [
            {
              "name": "Security Policy",
              "value": "Confidential"
            }
          ],
          "template_id": "ptid:1a5n2i6d3OYEAAAAAAAAAYa"
        }
      ],
      "rev": "string",
      "server_modified": "2024-01-15T09:30:00Z",
      "sharing_info": {
        "parent_shared_folder_id": "84528192421",
        "read_only": false
      },
      "size": 1
    }
  ],
  "has_more": false
}
```

**SDK Code**

```python
import requests

url = "https://api.dropboxapi.com/2/files/list_folder"

payload = {
    "path": "/Homework/math",
    "recursive": False
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript
const url = 'https://api.dropboxapi.com/2/files/list_folder';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"path":"/Homework/math","recursive":false}'
};

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"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.dropboxapi.com/2/files/list_folder"

	payload := strings.NewReader("{\n  \"path\": \"/Homework/math\",\n  \"recursive\": false\n}")

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

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	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://api.dropboxapi.com/2/files/list_folder")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"path\": \"/Homework/math\",\n  \"recursive\": false\n}"

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://api.dropboxapi.com/2/files/list_folder")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"path\": \"/Homework/math\",\n  \"recursive\": false\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.dropboxapi.com/2/files/list_folder', [
  'body' => '{
  "path": "/Homework/math",
  "recursive": false
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.dropboxapi.com/2/files/list_folder");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"path\": \"/Homework/math\",\n  \"recursive\": false\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "path": "/Homework/math",
  "recursive": false
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

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

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()
```