Library for using Modern VK Audio API
Supports:
langparam -en(default) |ru- availability to set custom
versionparam - Your own Client implementation with
VKClienttype (default:VKMobileClient) - auto refresh access token for
VKWebClient
Unsupported:
- Some other endpoints...
Install it:
bun i @toil/vk-audioSimple 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
pandremixsidcookie (just steal it fromNetworktab in browser) - VK Mobile client, but without auto-refresh (token lifetime is 10800)
Used references:
- vodka2/vk-audio-token
- issamansur/vkpymusic
- my mind...