What is the Fetch capability? How does it work?
The Fetch capability lets apps send HTTP requests to a third-party server. This unlocks a huge range of possibilities, such as integrating with external services and performing CPU-heavy tasks.
- Run code that can't (or shouldn't) run in the browser.
- Build apps that connect to existing APIs.
- The app initializes the Fetch capability.
- The app calls a method to send a request to a registered endpoint.
- The request is sent via Canva's backend.
- The app's backend responds to the request.
- The response is sent back to the app's frontend via Canva's backend.
- The method that sent the request returns the details of the response.
- Apps can only send
Content-Typeof all responses must be
- A request can only contain a body or query parameters, not both.
- The maximum combined size of the headers and the body or params is 512kb.
- The names of custom headers must be prefixed with
X-, such as
- The names of headers must not conflict with the headers that Canva includes with all requests, such as
- An app's backend must respond to requests within 3 seconds (or implement polling).
- Apps can't set requests to endpoints with URL parameters, such as