Devlio API & Official SDKs

Automate your workflow, sync sales data, verify licenses, and integrate Devlio into your apps with the official Python and Node.js SDKs or REST API.

6 min read Updated for Devlio 2026 Verified Guide

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

ScopeAccess LevelDescription
profileReadUser profile, username, email, account balance, and seller verification status.
projectsReadList your published projects, statistics (views, downloads, likes), and pricing.
salesReadInspect gross and net sales, individual orders, buyer usernames, and earnings summary.
licensesReadAccess software licenses, purchases, grants, and subscription statuses.
downloadsReadView personal download history and authorized digital assets.
couponsRead / WriteList discount coupons, create new promo codes, and toggle active status.
ticketsRead / WriteView support tickets, create new inquiries, and reply to messages.
notifyRead / WriteFetch unread notifications and mark them as read.
wishlistReadInspect 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_...
MethodEndpointRequired ScopeDescription
GET/api/v2/meprofileAccount profile, balance, and verification status.
GET/api/v2/projects/mineprojectsList your authorized marketplace projects (supports ?page=1).
GET/api/v2/projects/{id}/salessalesSales transactions, gross/net amounts, and buyers for project ID.
GET/api/v2/earnings/summarysalesBalance, total earnings, and recent earnings entries.
GET/api/v2/licenseslicensesAll purchased licenses, grants, and subscriptions.
GET/api/v2/downloadsdownloadsDownload activity history and file links.
GET/api/v2/couponscouponsActive discount codes for your projects.
POST/api/v2/couponscouponsCreate a new promotional discount coupon.
POST/api/v2/coupons/{id}/togglecouponsToggle active status of a discount coupon.
DELETE/api/v2/coupons/{id}couponsPermanently delete a discount coupon.
GET/api/v2/ticketsticketsList customer support tickets (?status=open|closed|all).
GET/api/v2/tickets/{id}ticketsFetch conversation thread and messages for a ticket.
POST/api/v2/ticketsticketsCreate a new support ticket.
POST/api/v2/tickets/{id}/replyticketsReply to an existing ticket.
GET/api/v2/notificationsnotifyList account notifications.
POST/api/v2/notifications/mark-readnotifyMark all notifications as read.
GET/api/v2/wishlistwishlistList 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.