Integration Examples
Complete code examples for integrating with the Emberly API in Node.js, Python, Go, and Bash.
Real-world examples of using the Emberly API in Node.js, Python, Go, and Bash.
Prerequisites
All examples require:
- Upload Token — Find yours at Dashboard → Settings → Profile → Upload Token
- Base URL —
https://embrly.ca/api - Auth header —
Authorization: Bearer YOUR_UPLOAD_TOKEN
Some endpoints (profile, domains, analytics) require a browser session cookie rather than a bearer token. These are used by the dashboard and are not typical for external integrations. The examples below cover bearer-token endpoints.
Node.js / JavaScript
Basic Setup
Example 1: Upload a File
Example 2: Shorten a URL
Example 3: Delete a File
Example 4: Set File Expiry
Example 5: Add a File Collaborator
Python
Installation
Basic Setup
Example 1: Upload a File
Example 2: Shorten a URL
Example 3: Download a File
Example 4: Batch Upload a Directory
Go
Installation
Basic Setup
Example 1: Upload a File
Example 2: Create a Short URL
Bash / cURL
Setup
Example 1: Upload a File
Example 2: Shorten a URL
Example 3: Delete a File
Example 4: Upload from Screenshot
Error Handling
All API errors return { "success": false, "error": "..." }.
Rate Limits
| Plan | Uploads/min | API Requests/min |
|---|---|---|
| Spark | 10 | 60 |
| Glow+ | Higher | Higher |
| Enterprise | Unlimited | Unlimited |
Rate limit headers: