We are not accepting new Applications for Print Partners.

initialize

Initializes the Partnership SDK.

Usage

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

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 product catalog and the Canva editor.
opts.locale
string
No
The language code the SDK uses to render the product catalog and the Canva editor. If not set, the SDK determines the locale from the user's browser settings. If set, the SDK ignores the user's browser settings.

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.