Usage
(async () => {const api = await Canva.Partnership.initialize({apiKey: "<partner_api_key>",autoAuthToken: "<auto_auth_token>",container: document.getElementById("container"),});const onDesignClose = () => {// the user has closed the Canva editorconsole.log("You closed the Canva editor!");};const onProductSelect = (opts) => {api.createDesign({...opts,onDesignClose,});};api.showCatalog({onProductSelect,});})();
JAVASCRIPT