Back to posts

The Doras API

The Doras API
Tommerty

Tommerty

Updated on 28th Feb, 2024

Public (open) API

This can be used to pull certain information from your profile, or anyone else’s! Right now it’s an open API only showing public facing information, which can be used to view aspects of your account or brand.

User

Link: https://api.doras.to/user/$username (replace $username with the username you’re querying)

Example:

{
    "username": "username",
    "displayname": "Display Name",
    "pic": "https://cdn.doras.to/doras/user/id.webp"
} 

This can be used to pull your username, display name, and your profile picture.

Links

Link: https://api.doras.to/user/$username/links (replace $username with the username you’re querying)

This generates an array of your link blocks.

Example of the output with a single link block:

   [
    {
        "id": "id-of-button",
        "created_at": "YYYY-MM-DDTHH:MM:SS",
        "updated_at": "YYYY-MM-DDTHH:MM:SS",
        "name": "Button Title",
        "url": "https://button-url",
        "icon": "Iconxx", --- uses Tabler.io
        "colour": {
            "text": "#hex", --- usually blank unless a custom color was applied
            "background": "#hex",
            "toggle": boolean --- toggle for custom color of button
        },
        "type": "link",
        "adult": boolean, --- if there is a content warning
        "show": boolean, --- if button is enabled or not
        "message": "",
        "group": [],
        "chosen": false,
        "selected": false,
        "clicks": [
            "YYYY-MM-DDTHH:MM:SS",
        ]
    }
   ] 

Mediakit

Link: https://api.doras.to/user/$username/mediakit (replace $username with the username you’re querying)

Mediakit can quite differ depending on the platforms you’ve connected, so here’s the types list instead:

 

    type: "twitch" | "youtube" | "twitter" | "bluesky" | "threads";
    id: string;
    username?: string;
    channel_id?: string;
    enabled?: boolean;
    followers?: number;
    posts?: number;
    follows?: number;
    subscribers?: number;
    videos?: number;
    tweets?: number;
    following?: number;

Not every platform will have every type, for example YouTube won’t have a “followers”, “subscribers” only works on YouTube (we are currently not pulling Twitch subs to fill here, in case you get confused!)

Private API (coming soon)

This is the closed API which requires an API token. This will allow you to modify your profile via websockets instead of directly through the website.

A Doras Pro account is required to generate an API token. If you leave Doras Pro, the token will also be cleared.

Enjoy this post?

Share it to help others find it!