1. Authentication & Token Scoping
To interact with the Devlio API, generate a personal access token at Profile → API & SDK Tokens.
Project-Level Isolation
Choose between "All Projects" or lock down the token strictly to "Selected Projects Only" so third-party tools cannot access unauthorized items.
Granular Scopes
Grant only the exact permissions needed (e.g. read sales only, or manage coupons only). All queries are strictly filtered by your own account.
Available Permission Scopes
| Scope | Access Level | Description |
|---|---|---|
profile | Read | User profile, username, email, account balance, and seller verification status. |
projects | Read | List your published projects, statistics (views, downloads, likes), and pricing. |
sales | Read | Inspect gross and net sales, individual orders, buyer usernames, and earnings summary. |
licenses | Read | Access software licenses, purchases, grants, and subscription statuses. |
downloads | Read | View personal download history and authorized digital assets. |
coupons | Read / Write | List discount coupons, create new promo codes, and toggle active status. |
tickets | Read / Write | View support tickets, create new inquiries, and reply to messages. |
notify | Read / Write | Fetch unread notifications and mark them as read. |
wishlist | Read | Inspect bookmarked and saved marketplace projects. |
Interactive Authorization Screen: If you are building a tool or CLI, you can direct users to /authorize?app=YourAppName to present a clean consent prompt allowing them to choose their projects and scopes.
2. Official Python SDK (devlio)
The official Python SDK provides type hints, error handling, and clean methods for both API v2 and license verification.
Installation
pip install devlio
Quickstart Example
from devlio import DevlioClient
# Initialize with your personal access token
client = DevlioClient("devlio_u_your_token_here")
# 1. Fetch authenticated account profile & balance
me = client.get_me()
print(f"Logged in as: {me['user']['username']}, Balance: ${me['user']['balance_cents'] / 100:.2f}")
# 2. List your projects (respects project scoping)
projects = client.get_my_projects()
for p in projects.get("projects", []):
print(f"- [{p['id']}] {p['title']} ({p['views']} views, {p['downloads']} downloads)")
# 3. View sales of a specific project
if projects.get("projects"):
pid = projects["projects"][0]["id"]
sales = client.get_project_sales(pid)
print(f"Net Revenue for project {pid}: ${sales['net_cents'] / 100:.2f} ({sales['count']} orders)")
# 4. View earnings summary
earnings = client.get_earnings_summary()
print("Total Lifetime Earnings:", earnings["total_earnings_cents"])
# 5. Create a discount coupon
new_coupon = client.create_coupon(
project_id=pid,
code="SUMMER20",
discount_percent=20,
max_uses=50
)
print("Created coupon:", new_coupon)
3. Official Node.js SDK (devlio-sdk)
The official Node.js SDK features complete async/await Promise support and TypeScript declarations out-of-the-box.
Installation
npm install devlio-sdk
Quickstart Example
const { DevlioClient } = require('devlio-sdk');
// Initialize with your personal access token
const client = new DevlioClient('devlio_u_your_token_here');
async function main() {
try {
// 1. Fetch user info
const me = await client.getMe();
console.log(`Connected as @${me.user.username}`);
// 2. Fetch projects
const { projects } = await client.getMyProjects();
console.log(`Authorized Projects: ${projects.length}`);
// 3. Fetch earnings
const earnings = await client.getEarningsSummary();
console.log(`Current Balance: $${(earnings.balance_cents / 100).toFixed(2)}`);
// 4. Fetch support tickets
const tickets = await client.getTickets({ status: 'open' });
console.log(`Open Tickets: ${tickets.tickets.length}`);
} catch (err) {
console.error('API Error:', err.message);
}
}
main();
4. Direct REST API Reference
If you are developing in Go, Rust, PHP, or cURL, you can call the REST endpoints directly:
Base URL: https://devlio.store/api/v2
Header: Authorization: Bearer devlio_u_...
| Method | Endpoint | Required Scope | Description |
|---|---|---|---|
GET | /api/v2/me | profile | Account profile, balance, and verification status. |
GET | /api/v2/projects/mine | projects | List your authorized marketplace projects (supports ?page=1). |
GET | /api/v2/projects/{id}/sales | sales | Sales transactions, gross/net amounts, and buyers for project ID. |
GET | /api/v2/earnings/summary | sales | Balance, total earnings, and recent earnings entries. |
GET | /api/v2/licenses | licenses | All purchased licenses, grants, and subscriptions. |
GET | /api/v2/downloads | downloads | Download activity history and file links. |
GET | /api/v2/coupons | coupons | Active discount codes for your projects. |
POST | /api/v2/coupons | coupons | Create a new promotional discount coupon. |
POST | /api/v2/coupons/{id}/toggle | coupons | Toggle active status of a discount coupon. |
DELETE | /api/v2/coupons/{id} | coupons | Permanently delete a discount coupon. |
GET | /api/v2/tickets | tickets | List customer support tickets (?status=open|closed|all). |
GET | /api/v2/tickets/{id} | tickets | Fetch conversation thread and messages for a ticket. |
POST | /api/v2/tickets | tickets | Create a new support ticket. |
POST | /api/v2/tickets/{id}/reply | tickets | Reply to an existing ticket. |
GET | /api/v2/notifications | notify | List account notifications. |
POST | /api/v2/notifications/mark-read | notify | Mark all notifications as read. |
GET | /api/v2/wishlist | wishlist | List bookmarked projects. |
5. Security & Best Practices
- Principle of Least Privilege: Only select the scopes and specific projects required for your script.
- Environment Variables: Never hardcode tokens into public repositories. Store tokens securely in environment variables (e.g. <code>DEVLIO_TOKEN</code>).
- Expiration Dates: Use expirations (e.g. 90 or 180 days). If a token is compromised, it will automatically expire.
- Instant Revocation: If a token is lost or compromised, revoke it immediately from Profile → API & SDK Tokens.