SKILL.md
Canva Common Errors
Overview
Quick reference for the most common Canva Connect API errors at api.canva.com/rest/v1/* with real HTTP status codes, error payloads, and fixes.
Error Reference
401 Unauthorized — Token Expired or Invalid
{ "error": "invalid_token", "message": "The access token is invalid or expired" }
Cause: Access tokens expire after ~4 hours. Token may be malformed or revoked.
Fix:
// Refresh the token
const res = await fetch('https://api.canva.com/rest/v1/oauth/token', {
method: 'POST',
headers: {
'Authorization': `Basic ${Buffer.from(`${clientId}:${clientSecret}`).toString('base64')}`,
'Content-Type': 'application/x-www-form-urlencoded',
},
body: new URLSearchParams({
grant_type: 'refresh_token',
refresh_token: storedRefreshToken,
}),
});
const { access_token, refresh_token } = await res.json();
// IMPORTANT: Each refresh token is single-use — store the new one
403 Forbidden — Missing Scope or Insufficient Permissions
{ "error": "insufficient_scope", "message": "Required scope: design:content:write" }
Cause: Your integration doesn't have the required OAuth scope enabled, or the user isn't authorized for the resource.
Fix:
- Check required scope in the Scopes Reference
- Enable the scope in your integration settings at canva.dev
- Re-authorize the user — existing tokens don't gain new scopes retroactively
429 Too Many Requests — Rate Limited
{ "error": "rate_limit_exceeded", "message": "Rate limit exceeded" }
Cause: Exceeded per-endpoint rate limits. Key limits:
