canva-hello-world

Featured

Create a minimal working Canva Connect API example. Use when starting a new Canva integration, testing your setup, or learning basic Canva REST API patterns. Trigger with phrases like "canva hello world", "canva example", "canva quick start", "simple canva code".

AI & Automation 2,926 stars 433 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Canva Hello World ## Overview Minimal working example: authenticate, get user profile, create a design, and export it as PNG. All via the Canva Connect REST API at `api.canva.com/rest/v1/*`. ## Prerequisites - Completed `canva-install-auth` — valid OAuth access token - Scopes enabled: `design:meta:read`, `design:content:write`, `design:content:read` ## Instructions ### Step 1: Create a Reusable API Helper ```typescript // src/canva/client.ts const CANVA_BASE = 'https://api.canva.com/rest/v1'; export async function canvaAPI( path: string, accessToken: string, options: RequestInit = {} ): Promise<any> { const res = await fetch(`${CANVA_BASE}${path}`, { ...options, headers: { 'Authorization': `Bearer ${accessToken}`, 'Content-Type': 'application/json', ...options.headers, }, }); if (!res.ok) { const body = await res.text(); throw new Error(`Canva API ${res.status}: ${body}`); } return res.status === 204 ? null : res.json(); } ``` ### Step 2: Get Your User Profile ```typescript // GET /v1/users/me — no scopes required, rate limit: 10 req/min const me = await canvaAPI('/users/me', accessToken); console.log(`User ID: ${me.team_user.user_id}`); console.log(`Team ID: ${me.team_user.team_id}`); ``` ### Step 3: Create a Design ```typescript // POST /v1/designs — scope: design:content:write, rate limit: 20 req/min const design = await canvaAPI('/designs', accessToken, { method: 'POST', body: JSON.stringify({ d...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
1 years ago
Last Updated
yesterday
Language
Python
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category