Skip to content
Fluxer API

Peer-to-peer voice

In a peer-to-peer voice call, Fluxer gives clients STUN servers only and never relays media. Clients send a report for each peer connection once it connects or fails. Fluxer stores the reports, and no API returns them.

The outcome of one peer connection, as the reporting client saw it.

FieldTypeDescription
channel_idsnowflakeThe ID of the voice channel or private channel
guild_id?snowflakeThe ID of the guild, null in a private channel
participant_countintegerNumber of people in the call when the connection connected or failed (2-4)
outcomestringconnected or failed
local_candidate_type?stringhost, srflx, prflx or relay for the local end of the selected pair, null without one
remote_candidate_type?stringhost, srflx, prflx or relay for the remote end of the selected pair, null without one
ip_family?stringipv4 or ipv6, null without a selected pair
protocol?stringudp or tcp, null without a selected pair
setup_ms?integerMilliseconds from creating the connection until it first connected, null if it never connected
ice_restartedbooleanWhether the connection ran an ICE restart
{
"channel_id": "1189375284394692610",
"guild_id": null,
"participant_count": 2,
"outcome": "connected",
"local_candidate_type": "srflx",
"remote_candidate_type": "host",
"ip_family": "ipv6",
"protocol": "udp",
"setup_ms": 840,
"ice_restarted": false
}
POST/v1/voice/p2p/connection-reports

Records connection reports. Fluxer keeps each report for 180 days, together with your user ID, your IP address and its country, and your session's platform and operating system. When peer-to-peer voice is off on the instance, the request returns 204 and stores nothing.

FieldTypeDescription
reportsarray[connection report object]The reports to record (1-8)
StatusBodyCondition
204emptyThe reports were recorded
400error responseINVALID_FORM_BODY when any report is invalid, and nothing is recorded
403error responseACCESS_DENIED when the caller is a bot or uses an OAuth2 bearer token

The rate limit is 10 requests per minute, on the voice:p2p:connection_reports bucket.