New Patterns: Interacting with Files
New Patterns: Interacting with Files
New Patterns: Interacting with Files
In 2022, Dropbox Sign made important investments to improve developer experience. We adopted and maintain an official OpenAPI spec for the Dropbox Sign API, which powers our documentation and SDKs.
This architecture ensures ongoing parity between the Dropbox Sign API and the resources used to build with it. However, we had to make some changes to the way users interact with files when using the API.
The changes introduced by the OpenAPI, and subsequently all new SDKs, enforce different approaches to uploading (passed within the API request) and downloading files. The changes are as follows:
files parameter only accepts binary.In this document, we’ll identify each change and provide some context around why it was necessary. If you’re migrating to a new SDK, please refer to the table below and use the examples in your SDK’s migration guide.
Many endpoints in the Dropbox Sign API allow you to send a file with your API request. Passing a file using file_urls remains the same. However, directly passing a file with the files parameter has been changed.
This change helps improve security, but also gives you more flexibility around where and how you process files. The small jump in complexity is a worthwhile tradeoff for having more control over the file processing in your integration
The table below outlines the options for doing this based on SDK:
The Dropbox Sign API can be used to download files (documents, templates) in several different formats. Those formats include:
base64 encoded string)This change was necessary because our new, OpenAPI-powered architecture couldn’t support returning different file types in the response. We decided the best long-term solution was to split the functionality across multiple endpoints that were purpose-built to return a specific format.
The changes made to the Dropbox Sign API around file interaction break past patterns of usage. We know that can be disruptive and sometimes frustrating. However, these changes were made because the API Engineering team found them to be the best long-term solutions that will ultimately contribute to the success of our API customers. If you have questions or need help, please submit a request.