@toil/vk-audio - v0.0.5
    Preparing search index...

    @toil/vk-audio - v0.0.5

    @toil/vk-audio

    Library for using Modern VK Audio API

    Supports:

    • lang param - en (default) | ru
    • availability to set custom version param
    • Your own Client implementation with VKClient type (default: VKMobileClient)
    • auto refresh access token for VKWebClient

    Unsupported:

    • Some other endpoints...

    Install it:

    bun i @toil/vk-audio
    

    Simple usage example:

    import { VKAudio } from "@toil/vk-audio";
    import { VKMobileClient } from "@toil/vk-audio/client";

    const webClient = new VKWebClient({
    cookies: {
    p: COOKIE_P,
    remixsid: COOKIE_REMIX_SID,
    },
    });

    const client = new VKAudio({
    client: webClient,
    token: {
    value: "",
    expiresIn: -1,
    },
    });

    const result = await client.getSections();

    You can see more usage examples in tests folder

    Lib provides support:

    • VK Web client with p and remixsid cookie (just steal it from Network tab in browser)
    • VK Mobile client, but without auto-refresh (token lifetime is 10800)

    Used references: