Skip to content

Every analytics tool wants a subscription. And your data. I built Twiligent instead. YouTube stats. Instagram stats. One dashboard. Runs locally on your machine.

9.1 KB
Raw Blame
{
    "responses": [
        {
            "status": 404,
            "body": "{\"success\":false,\"code\":\"NOT_FOUND\",\"message\":\"Account not found\",\"requestId\":\"req-test\"}"
        },
        {
            "status": 200,
            "body": "{\"success\":true,\"account\":{\"id\":\"ig1\",\"platform\":\"instagram\",\"igUserId\":\"1789\",\"username\":\"ribbon\",\"tokenExpiresAt\":\"2026-09-05T00:00:00.000Z\",\"followersCount\":2500,\"lastUpdated\":\"2026-09-01T12:00:00.000Z\",\"followsCount\":10,\"mediaCount\":140,\"title\":\"Ribbon\",\"profilePictureUrl\":\"https://p\",\"biography\":\"Bio\",\"website\":\"https://r.example\"}}"
        },
        {
            "status": 400,
            "body": "{\"success\":false,\"code\":\"VALIDATION_ERROR\",\"message\":\"No access token stored - reconnect this Instagram account\",\"requestId\":\"req-test\"}"
        },
        {
            "status": 404,
            "body": "{\"success\":false,\"code\":\"NOT_FOUND\",\"message\":\"Account not found\",\"requestId\":\"req-test\"}"
        },
        {
            "status": 200,
            "body": "{\"success\":true,\"account\":{\"id\":\"yt1\",\"platform\":\"youtube\",\"channelId\":\"UCaaaaaaaaaaaaaaaaaaaaaa\",\"title\":\"Channel UCaa\",\"subscriberCount\":500,\"lastUpdated\":\"2026-09-01T12:00:00.000Z\",\"viewCount\":9000,\"videoCount\":12,\"description\":\"Desc\",\"thumbnails\":{\"default\":\"d\",\"medium\":\"m\",\"high\":\"h\"},\"customUrl\":\"@chan\",\"country\":\"GB\",\"keywords\":\"k\",\"topicCategories\":[\"t\"]}}"
        },
        {
            "status": 503,
            "body": "{\"success\":false,\"code\":\"NOT_CONFIGURED\",\"message\":\"YouTube API key not configured on server\",\"requestId\":\"req-test\"}"
        },
        {
            "status": 404,
            "body": "{\"success\":false,\"code\":\"NOT_FOUND\",\"message\":\"Channel not found\",\"requestId\":\"req-test\"}"
        },
        {
            "status": 404,
            "body": "{\"success\":false,\"code\":\"NOT_FOUND\",\"message\":\"Account not found\",\"requestId\":\"req-test\"}"
        }
    ],
    "requests": [
        {
            "url": "https://graph.instagram.com/v25.0/1789?access_token=IGTOKEN&fields=user_id%2Cusername%2Cname%2Cprofile_picture_url%2Cfollowers_count%2Cfollows_count%2Cmedia_count%2Cbiography%2Cwebsite",
            "method": "GET"
        },
        {
            "url": "https://www.googleapis.com/youtube/v3/channels?part=snippet%2Cstatistics%2CcontentDetails%2CbrandingSettings%2Cstatus%2CtopicDetails&id=UCaaaaaaaaaaaaaaaaaaaaaa&key=YTKEY",
            "method": "GET"
        },
        {
            "url": "https://www.googleapis.com/youtube/v3/channels?part=snippet%2Cstatistics%2CcontentDetails%2CbrandingSettings%2Cstatus%2CtopicDetails&id=UCmissingmissingmissing0&key=YTKEY",
            "method": "GET"
        }
    ],
    "calls": [
        {
            "type": "select",
            "table": "accounts",
            "columns": "id, platform, data",
            "filters": [
                [
                    "id",
                    "nope"
                ],
                [
                    "platform",
                    [
                        "youtube",
                        "instagram"
                    ],
                    "in"
                ],
                [
                    "user_id",
                    "user-1"
                ]
            ]
        },
        {
            "type": "select",
            "table": "accounts",
            "columns": "id, platform, data",
            "filters": [
                [
                    "id",
                    "ig1"
                ],
                [
                    "platform",
                    [
                        "youtube",
                        "instagram"
                    ],
                    "in"
                ],
                [
                    "user_id",
                    "user-1"
                ]
            ]
        },
        {
            "type": "rpc",
            "table": "merge_account_data",
            "values": {
                "p_id": "ig1",
                "p_user_id": "user-1",
                "p_patch": {
                    "lastUpdated": "2026-09-01T12:00:00.000Z",
                    "followersCount": 2500,
                    "followsCount": 10,
                    "mediaCount": 140,
                    "title": "Ribbon",
                    "username": "ribbon",
                    "profilePictureUrl": "https://p",
                    "biography": "Bio",
                    "website": "https://r.example"
                }
            },
            "filters": []
        },
        {
            "type": "select",
            "table": "accounts",
            "columns": "id, platform, data",
            "filters": [
                [
                    "id",
                    "ig2"
                ],
                [
                    "platform",
                    [
                        "youtube",
                        "instagram"
                    ],
                    "in"
                ],
                [
                    "user_id",
                    "user-1"
                ]
            ]
        },
        {
            "type": "select",
            "table": "accounts",
            "columns": "id, platform, data",
            "filters": [
                [
                    "id",
                    "old1"
                ],
                [
                    "platform",
                    [
                        "youtube",
                        "instagram"
                    ],
                    "in"
                ],
                [
                    "user_id",
                    "user-1"
                ]
            ]
        },
        {
            "type": "select",
            "table": "accounts",
            "columns": "id, platform, data",
            "filters": [
                [
                    "id",
                    "yt1"
                ],
                [
                    "platform",
                    [
                        "youtube",
                        "instagram"
                    ],
                    "in"
                ],
                [
                    "user_id",
                    "user-1"
                ]
            ]
        },
        {
            "type": "rpc",
            "table": "merge_account_data",
            "values": {
                "p_id": "yt1",
                "p_user_id": "user-1",
                "p_patch": {
                    "lastUpdated": "2026-09-01T12:00:00.000Z",
                    "subscriberCount": 500,
                    "viewCount": 9000,
                    "videoCount": 12,
                    "title": "Channel UCaa",
                    "description": "Desc",
                    "thumbnails": {
                        "default": "d",
                        "medium": "m",
                        "high": "h"
                    },
                    "customUrl": "@chan",
                    "country": "GB",
                    "keywords": "k",
                    "topicCategories": [
                        "t"
                    ]
                }
            },
            "filters": []
        },
        {
            "type": "select",
            "table": "accounts",
            "columns": "id, platform, data",
            "filters": [
                [
                    "id",
                    "yt1"
                ],
                [
                    "platform",
                    [
                        "youtube",
                        "instagram"
                    ],
                    "in"
                ],
                [
                    "user_id",
                    "user-1"
                ]
            ]
        },
        {
            "type": "select",
            "table": "accounts",
            "columns": "id, platform, data",
            "filters": [
                [
                    "id",
                    "yt2"
                ],
                [
                    "platform",
                    [
                        "youtube",
                        "instagram"
                    ],
                    "in"
                ],
                [
                    "user_id",
                    "user-1"
                ]
            ]
        },
        {
            "type": "select",
            "table": "accounts",
            "columns": "id, platform, data",
            "filters": [
                [
                    "id",
                    "other"
                ],
                [
                    "platform",
                    [
                        "youtube",
                        "instagram"
                    ],
                    "in"
                ],
                [
                    "user_id",
                    "user-1"
                ]
            ]
        }
    ],
    "redis": [],
    "logs": [
        [
            "error",
            "{\"level\":\"error\",\"message\":\"request failed\",\"requestId\":\"req-test\",\"userId\":\"user-1\",\"code\":\"NOT_CONFIGURED\",\"status\":503,\"error\":\"YouTube API key not configured on server\",\"errorName\":\"NotConfiguredError\"}"
        ]
    ]
}