POST /publish/resources/get
If a publish extension uses the Flat list or Nested list layout, the user can select a container (folder) before publishing their design. If the user selects a container, Canva sends a POST
request to the following endpoint:
<base_url>/publish/resources/get
Canva sends the request immediately before sending the request to the /publish/resources/upload
endpoint.
The purpose of the request is to verify that:
- The selected container still exists on the destination platform.
- The user still has access to the selected container.
If the extension can't verify the existence of the container or the permissions of the user, Canva shows an error to the user and doesn't continue the publishing process.
Notes
- Extensions must respond to this request within 8 seconds.
- When sending this request, Canva replaces
<base_url>
with the extension's Base URL. You can configure the Base URL via the Developer Portal. - Extensions should meet the UX guidelines.
Request
Endpoint
POST <base_url>/publish/resources/get
Headers
Body
Properties
Example
{"preferredThumbnailHeight": 500,"preferredThumbnailWidth": 500,"user": "<user>","brand": "<brand>","label": "<label>","id": "<id>"}
Responses
200 - Success
The response an extension provides when the selected container still exists on the destination platform.
Properties
Example
{"resource": {"isOwner": true,"readOnly": true,"id": "<id>","name": "<name>","type": "<type>"},"type": "SUCCESS"}
200 - Error
Properties
Example
{"type": "ERROR","errorCode": "<error_code>"}
401 - Invalid request signature or timestamp
An extension must verify the request signature and timestamp of all incoming requests. When an extension can't verify either of these values, it must reject the request with a 401
status code.
Schemas
Thumbnail
A thumbnail image.
Properties
Example
{"url": "<url>"}