I dont know, how long it will work, perhaps until they radically change any functions on their page, but... it working
Aaand, it seems to me that it is possible to place Discord integration in the Chrome plugin, and I will try to do this, but for now VKMusic integration in discord requires 3 services (Chrome plugin -> nowPlayingApi -> Discord integration app)
Todo:
- - Embedded discord integration
Yes, this is pobeda, i make two Rich Presence app
- NodeJS Crossplatformed, well, sort of
- Swift Native for macOS (11+), it seems to work
Simple now playing api :P
Any response codes sent in http headers, in case of errors they are also transmitted along with json for convenience.
Todo:
- - Support live broadcast (optional
end_timestampfield) - - Add field for activity type (Listening, Watching or other)
- - Functional field for callbacks
Send GET to https://nowplayingapi.yoricya.ru/generate
Response:
{
"key": "gKeybMIRBOezSvJzLwcztGZYGuoprOaaODFHeXEkKGNkbDJPTUPdphdRYglCQMVx",
"token": "2d27330d8c4f881fec3b831b56ae88171162e938c089a872bbbf1120144af9f9"
}
key - Private KEY, do not spread it.
token - Public token, you can be safety spread it
Send GET to https://nowplayingapi.yoricya.ru/set/{key}?...
{key} - Your private key
GET Parameters:
name - Name of track (For example: Dedicated)
author - Author of track (For example: ATB)
start_timestamp - Start listening timestamp in string (For example: 1737819287000)
service_name (Optional) - Name of music service (For example: VKMusic)
album_image (Optional) - Url to album image (For example: https://i.scdn.co/image/ab67616d0000b273a968feb0cd7b6a55b434530a)
track_url (Optional) - Url to track (For example: https://vk.com/audio-2001724620_32724620)
album_name (Optional) - Album name (For example: Dedicated)
end_timestamp (Optional) - End listening timestamp in string, do not specify to set live broadcast (For example: 1737819542000)
activity_type (Optional) - Activity type in integer, defaults: (0 - Listening, 1 - Watching) (For example: 0)
Send GET to https://nowplayingapi.yoricya.ru/set/{key}
{key} - Your private key
No GET parameters
Send GET to https://nowplayingapi.yoricya.ru/get/{token}
{token} - Your public token
Example response:
{
"is_playing": true,
"name": "Dedicated",
"author": "ATB",
"album_image": "https://i.scdn.co/image/ab67616d0000b273a968feb0cd7b6a55b434530a",
"service_name": "VK Music",
"start_timestamp_on_server_str": "1737837290440",
"start_timestamp": "1737819287000",
"end_timestamp": "1737819542000",
"track_url": "https://vk.com/audio-2001724620_32724620",
"is_live_broadcast": false,
"activity_type": 0
}
If token not found:
{
"code": 404,
"message": "Token not found"
}
If nothing playing now:
{
"is_playing": false,
"name": "",
"author": "",
"service_name": "default",
"start_timestamp_on_server_str": "",
"start_timestamp": "",
"end_timestamp": ""
}
Optional fields my be undefined!
If you lost token but you know key, you can be convert key to token:
Send GET to https://nowplayingapi.yoricya.ru/key/{key}
Response:
{
"key": "{key}",
"token": "{token}"
}
Minimum key length: 96! Otherwise:
{
"code": 400,
"message": "Key length too small"
}