Start 2025 on time and up to date. Seamlessly integrate your calendars into Dropbox with these simple steps.

Forum Discussion

cruelly's avatar
cruelly
New member | Level 1
2 months ago

Chatgpt Actions to interact with Dropbox

Hello, 

i am trying to use chatgpt actions to get and put files to my dropbox account. in below spec file, i am just trying to download /transactions.csv  from root folder of my dropbox. 

with curl command, it works perfectly fine but using chatgpt throws error. 



Could you please confirm if there’s an issue with my implementation or if additional headers or configurations are required to prevent the request body is supposed to be empty error?

 

i get below response from API:

{ "response_data": "Error in call to API function \"files/download\": The request body is supposed to be empty, but it isn't; got \"{}\"", "status_code": 400, "action_id": "g-d9e5d6855647322df1b771ba6c20113613691c5e" }

Below is my chatgpt spec file: 



openapi: 3.1.0
info:
  title: Dropbox File Management API
  version: 1.0.0
servers:
  - url: https://content.dropboxapi.com/2
paths:
  /files/download:
    post:
      summary: Download a file from Dropbox
      description: Downloads the file `transactions.csv` from Dropbox.
      operationId: downloadFile
      parameters:
        - name: Dropbox-API-Arg
          in: header
          required: true
          description: JSON string specifying the path to the file to be downloaded.
          schema:
            type: string
            example: '{"path": "/transactions.csv"}'
      responses:
        '200':
          description: File downloaded successfully.
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
        '401':
          description: Unauthorized.
        '404':
          description: File not found.
        '500':
          description: Internal server error.
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
  schemas: {}

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff

    The /2/files/download Dropbox API endpoint is a "content-download" style endpoint and so takes its parameters in a header, and does not expect any data in the request body. The error indicates that your network client is sending data in the request body, so the Dropbox server is rejecting the call.

    To address this, you'll need to make sure your client is not sending any data in the request body. As your client is not made by Dropbox though, we can't offer specific guidance on how to configure that, so you may need to refer to its documentation for information on how to configure it accordingly.