initialize

Initializes the Partnership SDK.

Usage

(async () => {
const api = await Canva.Partnership.initialize({
apiKey: "<api_key>",
autoAuthToken: "<auto_auth_token>",
container: document.getElementById("container"),
});
})();

Parameters

Parameter

Type

Required

Description

opts

object

Yes

Options for initializing the SDK.

opts.apiKey

string

Yes

The integration's Partner API key.

opts.autoAuthToken

string

No

The integration's authAuthToken.

opts.container

HTMLElement

No

The element where the SDK renders the catalog and editor.

Returns

Parameter

Type

Required

Description

api

object

Yes

API methods for defining the behavior of the integration.

api.showCatalog

function

Yes

Refer to showCatalog.

api.createDesign

function

Yes

Refer to createDesign.

api.editDesign

function

Yes

Refer to editDesign.