On September 25th, 2024, we released v2 of the Apps SDK. To learn what’s new and how to upgrade, see Migration FAQ and Migration guide.

getTemporaryUrl

API reference for the getTemporaryUrl method.

Returns a temporary URL to an asset already present in the current design.

Parameters

optionsGetTemporaryUrlOptions
REQUIRED

Options for retrieving a temporary URL that points to an asset in Canva's backend.

Options for retrieving a temporary URL that points to an image asset in Canva's backend.

typestring
REQUIRED

The type of asset.

This must be "image".

refImageRef
REQUIRED

A unique identifier that points to an image asset in Canva's backend.

Options for retrieving a temporary URL that points to a video asset in Canva's backend.

typestring
REQUIRED

The type of asset.

This must be "video".

refVideoRef
REQUIRED

A unique identifier that points to a video asset in Canva's backend.

Returns

The result of retrieving a temporary URL of an asset in Canva's backend. This is a Promise that resolves with the following object:

The result of retrieving a temporary URL of an image asset in Canva's backend.

typestring

The type of asset.

This must be "image".

refImageRef

A unique identifier that points to an image asset in Canva's backend.

urlstring

A temporary URL for downloading the asset.

The result of retrieving a temporary URL of a video asset in Canva's backend.

typestring

The type of asset.

This must be "video".

refVideoRef

A unique identifier that points to a video asset in Canva's backend.

urlstring

A temporary URL for downloading the asset.