agentsclimarketplace

Canva common errors

Skill ComeOnOliver/skillshub/skills/jeremylongshore/claude-code-plugins-plus-skills/canva-common-errors

🧠 The right skill, one API call. AI agent skills registry with token-efficient skill resolution. 5,000+ skills from 500+ top repos.

Install
npx -y skills add ComeOnOliver/skillshub --skill canva-common-errors

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

What its author says it does

Copied from the file, not written here

Diagnose and fix Canva Connect API errors and HTTP status codes. Use when encountering Canva errors, debugging failed requests, or troubleshooting integration issues. Trigger with phrases like "canva error", "fix canva", "canva not working", "debug canva", "canva 401", "canva 429".

The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

5.7 KB, ~1.4k tokens by cl100k_base, as published. Nobody here has run it

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:

  1. Check required scope in the Scopes Reference
  2. Enable the scope in your integration settings at canva.dev
  3. 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:

EndpointLimit
GET /v1/users/me10 req/min
POST /v1/designs20 req/min
GET /v1/designs100 req/min
POST /v1/exports75 req/5min, 500/24hr (per user)
POST /v1/asset-uploads30 req/min
POST /v1/autofills60 req/min
POST /v1/folders20 req/min

Fix:

async function canvaAPIWithRetry(path: string, token: string, opts: RequestInit = {}) {
  const res = await fetch(`https://api.canva.com/rest/v1${path}`, {
    ...opts,
    headers: { 'Authorization': `Bearer ${token}`, 'Content-Type': 'application/json', ...opts.headers },
  });

  if (res.status === 429) {
    const retryAfter = parseInt(res.headers.get('Retry-After') || '60');
    console.warn(`Rate limited — waiting ${retryAfter}s`);
    await new Promise(r => setTimeout(r, retryAfter * 1000));
    return canvaAPIWithRetry(path, token, opts); // Retry once
  }

  if (!res.ok) throw new Error(`Canva ${res.status}: ${await res.text()}`);
  return res.json();
}

404 Not Found — Resource Missing

Cause: Design, asset, template, or folder ID doesn't exist, was deleted, or the user doesn't have access.

Fix:

# Verify the resource exists — check design ID
curl -s -H "Authorization: Bearer $TOKEN" \
  https://api.canva.com/rest/v1/designs/$DESIGN_ID | jq '.design.id'

400 Bad Request — Validation Error

Common cases:

{ "error": "validation_error", "message": "Design title invalid" }
FieldConstraint
title1-255 characters
design_type.width40-8000 pixels
design_type.height40-8000 pixels
format.quality (JPG)1-100
format.width/height (export)40-25000 pixels
Chart dataMax 100 rows, 20 columns

Export Error Codes

CodeMeaningSolution
license_requiredDesign uses premium elementsUser needs Canva Pro subscription
approval_requiredDesign pending approvalUser must approve in Canva
internal_failureCanva server errorRetry after delay

OAuth Error Codes

CodeMeaningSolution
invalid_clientWrong client_id or secretCheck credentials
invalid_grantAuth code expired/reusedRestart OAuth flow
invalid_scopeScope not enabledEnable in integration settings
unsupported_grant_typeWrong grant_typeUse authorization_code or refresh_token

Quick Diagnostic Commands

# Check your token
curl -s -H "Authorization: Bearer $TOKEN" \
  https://api.canva.com/rest/v1/users/me | jq

# Check API connectivity
curl -sI https://api.canva.com/rest/v1/users/me \
  -H "Authorization: Bearer $TOKEN" 2>&1 | head -5

# Verify environment variables
echo "Client ID: ${CANVA_CLIENT_ID:+[SET]}"
echo "Access Token: ${CANVA_ACCESS_TOKEN:+[SET]}"

Error Handling

ErrorCauseSolution
ENOTFOUNDDNS failureCheck network connectivity
ETIMEDOUTNetwork timeoutIncrease timeout, check firewall
invalid_tokenExpired access tokenRefresh via OAuth endpoint
insufficient_scopeMissing permissionEnable scope, re-authorize

Resources

Next Steps

For comprehensive debugging, see canva-debug-bundle.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.