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.

3.1 KB
Raw Blame
{
    "responses": [
        {
            "status": 200,
            "body": "[{\"id\":\"yt1\",\"platform\":\"youtube\",\"channelId\":\"UCaaaaaaaaaaaaaaaaaaaaaa\",\"title\":\"Old title\",\"subscriberCount\":1},{\"id\":\"ig1\",\"platform\":\"instagram\",\"igUserId\":\"1789\",\"username\":\"ribbon\",\"tokenExpiresAt\":\"2026-09-05T00:00:00.000Z\",\"followersCount\":1},{\"id\":\"ig2\",\"platform\":\"instagram\",\"igUserId\":\"2000\",\"username\":\"notoken\"},{\"id\":\"yt2\",\"platform\":\"youtube\",\"channelId\":\"UCmissingmissingmissing0\"}]"
        },
        {
            "status": 200,
            "body": "{\"success\":true,\"data\":{\"channelId\":\"UCnnnnnnnnnnnnnnnnnnnnnn\",\"title\":\"Channel UCnn\",\"description\":\"Desc\",\"customUrl\":\"@chan\",\"publishedAt\":\"2020-01-01T00:00:00Z\",\"country\":\"GB\",\"thumbnails\":{\"default\":\"d\",\"medium\":\"m\",\"high\":\"h\"},\"subscriberCount\":500,\"viewCount\":9000,\"videoCount\":12,\"hiddenSubscriberCount\":false,\"uploadsPlaylistId\":\"UUnnnnnnnnnnnnnnnnnnnnnn\",\"keywords\":\"k\",\"bannerUrl\":\"\",\"madeForKids\":false,\"topicCategories\":[\"t\"],\"isLinked\":false}}"
        },
        {
            "status": 404,
            "body": "{\"success\":false,\"code\":\"NOT_FOUND\",\"message\":\"Channel not found\",\"requestId\":\"req-test\"}"
        },
        {
            "status": 503,
            "body": "{\"success\":false,\"code\":\"NOT_CONFIGURED\",\"message\":\"YouTube API key not configured on server\",\"requestId\":\"req-test\"}"
        },
        {
            "status": 400,
            "body": "{\"success\":false,\"code\":\"VALIDATION_ERROR\",\"message\":\"Malformed JSON in request body\",\"requestId\":\"req-test\"}"
        }
    ],
    "requests": [
        {
            "url": "https://www.googleapis.com/youtube/v3/channels?part=id&forHandle=creator&key=YTKEY",
            "method": "GET"
        },
        {
            "url": "https://www.googleapis.com/youtube/v3/channels?part=snippet%2Cstatistics%2CcontentDetails%2CbrandingSettings%2Cstatus%2CtopicDetails&id=UCnnnnnnnnnnnnnnnnnnnnnn&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": [
                [
                    "user_id",
                    "user-1"
                ],
                [
                    "platform",
                    [
                        "youtube",
                        "instagram"
                    ],
                    "in"
                ]
            ]
        }
    ],
    "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\"}"
        ]
    ]
}