Create a minimal working Linktree example. Trigger: "linktree hello world", "linktree example", "test linktree".
Minimal working examples demonstrating core Linktree API functionality.
const profile = await client.profiles.get('myprofile');
console.log(`Bio: ${profile.bio}`);
console.log(`Links: ${profile.links.length}`);
const link = await client.links.create({
profile_id: profile.id,
title: 'My Website',
url: 'https://example.com',
position: 0, // Top of list
thumbnail: 'https://example.com/icon.png'
});
console.log(`Created link: ${link.id}`);
await client.links.update(link.id, {
title: 'Updated Title',
archived: false
});
const links = await client.links.list({ profile_id: profile.id });
links.forEach(l => console.log(`${l.position}: ${l.title} → ${l.url}`));
| Error | Cause | Solution |
|---|---|---|
| Auth error | Invalid credentials | Check LINKTREE_API_KEY |
| Not found | Invalid endpoint | Verify API URL |
| Rate limit | Too many requests | Implement backoff |
See linktree-local-dev-loop.