Skip to main content
When you pass a -vk-link to the client, it extracts TURN server credentials from a live VK video call. This page explains how to get a valid link and how the credential flow works.
1

Log in to vk.com

You need an active VK account. Open vk.com in your browser and log in.
2

Create a video call

Start a new video call from the VK interface. VK generates a unique join link for the call.
3

Copy the join link

Copy the join URL. It has the form:
https://vk.com/call/join/<id>
Pass this full URL (or just the <id> part) to the client’s -vk-link flag.
The link is valid indefinitely — unless you click “end call for everyone” in the VK interface. If you end the call for everyone, the link stops working and you must create a new one. Do not end the call; simply close or leave the browser tab.
You can also search publicly shared VK call links (e.g. by searching "https://vk.com/call/join/" online). Be aware that using a public link means others may see a connection join the conference.

How credential retrieval works

When the client starts with a VK link, it performs the following steps automatically:
1

Fetch an anonymous token

The client sends a POST request to login.vk.ru to obtain an anonymous access token. No VK account login is required.
2

Exchange for a call-scoped token

The anonymous token is exchanged for a call-specific token via api.vk.ru, scoped to the provided invite link.
3

Join the OK CDN conference anonymously

Using the call-scoped token, the client joins the VK/OK CDN conference anonymously through calls.okcdn.ru.
4

Extract TURN credentials from the join response

The join response includes a turn_server object containing:
  • username — TURN authentication username
  • credential — TURN authentication password
  • urls — TURN server address (UDP, from the first non-TCP URL)
The client uses these credentials to allocate a TURN relay for each parallel connection.

TURN server network

VK’s infrastructure issues TURN server addresses from the following networks:
  • VK
  • Mail.ru (Max)
  • Odnoklassniki
If auto-discovered address does not work (connection errors or low throughput), pass a known-good IP manually with -turn <ip>. The port from the credential response is retained unless you also pass -port.

Parallel connections and bandwidth

The client opens -n parallel TURN allocations (default 16). Each VK TURN allocation is capped at approximately 5 Mbps. Multiple allocations aggregate throughput up to that cap.
If you need a more stable single-stream connection at the cost of maximum bandwidth, pass -n 1.

DNS resolution

For VK link credential requests, the client uses a custom DNS resolver with a fallback strategy and a 10-hour cache. Resolvers are tried in order:
ResolverProvider
77.88.8.8:53Yandex
77.88.8.1:53Yandex
8.8.8.8:53Google
8.8.4.4:53Google
1.1.1.1:53Cloudflare
The cache holds up to 100 entries with a positive TTL of 10 hours and a negative TTL of 10 hours.

Build docs developers (and LLMs) love