Voice Web APIs

Use the Voice Web APIs to use Voice interface features with RESTful services.

4 mins to read

The Epic Online Services (EOS) Voice interface helps you create and manage voice chat rooms between your users. They can communicate one-on-one or in groups across multiple platforms, during a match, or in your application’s lobby.

You can use the Voice Web APIs in place of the EOS C SDK to create trusted server applications that implement custom room management and authorization. Before calling the Voice Web APIs, check out the following documentation: Web API Introduction for standards, authentication, and error codes.

Just like the Voice C Interface, the Voice Web APIs are intended for use on a trusted server and require a policy with userRequired disabled.

Voice Web API Endpoint

https://api.epicgames.dev/rtc/

Creating Room Tokens

In order to join a voice conference on a media server, users need to provide a room token.

The createRoomToken request will query these tokens for a list of ProductUserIds, using the optional player IP addresses to select the best server region for the voice session.

If the specified roomId does not exist, it is created.

The result contains the players room tokens as well as the endpoint for the media server that hosts the voice session.

Policy

The client must have the Voice:createRoomToken policy.

Room Tokens

The individual tokens contained in the response should only be shared with the corresponding player (ProductUserId) that requested them and not be made visible to the entire group as this would allow kicked players to potentially reuse another player’s token to rejoin.

Authorization

This call requires Bearer Token authorization with an EOS Client Auth access token, obtained from the Connect interface Web API.

Request

HTTP RequestPOST /rtc/v1/{DeploymentId}/room/{RoomId}
HTTP Headers
NameValue
AuthorizationBearer <EOSAccessToken>
Content-Typeapplication/json
Path Parameters
NameTypeDescription
DeploymentIdStringThe EOS deployment ID
RoomIdStringA chosen voice room ID
POST Body Parameters
NameTypeDescription
participantsArray<EosRoomParticipantRequests>List of EosRoomParticipantRequests

EosRoomParticipantRequests

EosRoomParticipantRequests
NameTypeDescription
puidStringThe EOS ProductUserId
clientIPStringIP of the Participant, used to select an appropriate server region for the voice room.
hardMutedBooleanInitial mute status of the participant

Example Request

Response

200 - OK: Success
HTTP Headers
NameValue
Content-Typeapplication/json
JSON Payload
NameTypeDescription
roomIdStringThe voice room ID
clientBaseUrlStringThe URL of the media server to join for the voice session
participantsArray <EosRoomParticipantInfo>List of EosRoomParticipantInfo
deploymentIdStringThe deployment ID of the request

EosRoomParticipantInfo

EosRoomParticipantInfo
NameTypeDescription
puidStringThe EOS ProductUserId
tokenStringThe room token for that ProductUserId used to join the media server.
hardMutedBooleanMute status of the participant

Example Response

Removing a Participant

The removeParticipant request will remove a player from the voice room and revoke their room token, preventing them from reusing their existing token to join the same room again.

Request

HTTP RequestDELETE /rtc/v1/{DeploymentId}/room/{RoomId}/participants/{ProductUserId}
HTTP Headers
NameValue
AuthorizationBearer <EOSAccessToken>
Content-Typeapplication/json
Path Parameters
NameTypeDescription
DeploymentIdStringThe EOS deployment ID
RoomIdStringThe player's room ID
ProductUserIdStringThe player's product user ID

Example Request

Response

HTTP Response 204 - No Content.

Example Response

Modifying a Participant

Room members can be remote-muted, i.e. be muted for everyone, independent of their local mute status.

Request

POST /rtc/v1/{DeploymentId}/room/{RoomId}/participants/{ProductUserId}
HTTP Headers
NameValue
AuthorizationBearer <EOSAccessToken>
Content-Typeapplication/json
Path Parameters
NameTypeDescription
DeploymentIdStringThe EOS deployment ID
RoomIdStringA chosen voice room ID
POST Body Parameters
hardMutedBooleanMuted status: true or false

Example Request

Response

HTTP Response 204 - No Content.

Example Response