Anonymous editing
Some partners don't require users to login before creating designs via their website. In these cases, a partner can calculate an autoAuthToken with a random string instead of a user's ID:
1
const jwt = require("jwt-simple");
2
3
const now = Math.floor(new Date().getTime() / 1000);
4
5
const payload = {
6
iss: process.env.PARTNER_API_KEY,
7
sub: "<random_string>",
8
iat: now,
9
exp: now + 60 * 30,
10
};
11
12
const autoAuthToken = jwt.encode(payload, process.env.PARTNER_API_SECRET);
13
14
console.log(autoAuthToken);
Copied!
This still creates an account in Canva's backend, but the account isn't associated with a user in the partner's backend. As a result, the user is effectively anonymous.

Limitations

    If your integration uses anonymous editing, users can't view their previously created designs or uploaded media.
Last modified 8mo ago
Export as PDF
Copy link
Contents
Limitations