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 Request POST /rtc/v1/{DeploymentId}/room/{RoomId}
HTTP Headers
Name Value
Authorization Bearer <EOSAccessToken>
Content-Type application/json
Path Parameters
Name Type Description
DeploymentId String The EOS deployment ID
RoomId String A chosen voice room ID
POST Body Parameters
Name Type Description
participants Array<EosRoomParticipantRequests> List of EosRoomParticipantRequests

EosRoomParticipantRequests

EosRoomParticipantRequests
Name Type Description
puid String The EOS ProductUserId
clientIP String IP of the Participant, used to select an appropriate server region for the voice room.
hardMuted Boolean Initial mute status of the participant

Example Request

Response

200 - OK: Success
HTTP Headers
Name Value
Content-Type application/json
JSON Payload
Name Type Description
roomId String The voice room ID
clientBaseUrl String The URL of the media server to join for the voice session
participants Array <EosRoomParticipantInfo> List of EosRoomParticipantInfo
deploymentId String The deployment ID of the request

EosRoomParticipantInfo

EosRoomParticipantInfo
Name Type Description
puid String The EOS ProductUserId
token String The room token for that ProductUserId used to join the media server.
hardMuted Boolean Mute 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 Request DELETE /rtc/v1/{DeploymentId}/room/{RoomId}/participants/{ProductUserId}
HTTP Headers
Name Value
Authorization Bearer <EOSAccessToken>
Content-Type application/json
Path Parameters
Name Type Description
DeploymentId String The EOS deployment ID
RoomId String The player's room ID
ProductUserId String The 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
Name Value
Authorization Bearer <EOSAccessToken>
Content-Type application/json
Path Parameters
Name Type Description
DeploymentId String The EOS deployment ID
RoomId String A chosen voice room ID
POST Body Parameters
hardMuted Boolean Muted status: true or false

Example Request

Response

HTTP Response 204 - No Content.

Example Response