Voice Web APIs

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

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 Web API Overview 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.

createRoomToken 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

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

curl -X "POST" \ "https://api.epicgames.dev/rtc/voice/v1/<deploymentId>/room/<roomId>" \
-H "accept: application/json" \
-H "Authorization: Bearer <EOSAccessToken>" \
-H "Content-Type: application/json" \
-d "{ \"participants\": [ { \"puid\": \"<ProductUserId>\",\"clientIp\": \"<ClientIp>\", \"hardMuted\": false } ] }"

createRoomToken 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

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

{
  "roomId": "<RoomId>",
  "participants": [
    {
      "puid": "<ProductUserId>",
      "token": "<AccessToken>",
      "hardMuted": false
    }
  ],
  "clientBaseUrl": "<MediaServerUrl>",
  "deploymentId": "<DeploymentId>"
}

removeParticipant Request

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.

DELETE /rtc/v1/{DeploymentId}/room/{RoomId}/participants/{ProductUserId}

HTTP Headers

Name

Value

Authorization

Bearer <EOSAccessToken>

Content-Type

application/json

Path Parameters

DeploymentId

String

The EOS deployment ID

RoomId

String

The player's room ID

ProductUserId

String

The player's product user ID

Example Request

curl -X "DELETE" \ "https://api.epicgames.dev/rtc/v1/<deploymentId>/room/<roomId>/participants/<ProductUserId>" \
-H "Authorization: Bearer<EOSAccessToken>"

removeParticipant Response

204 - No Content

Example Response

204 No Content

modifyParticipant 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

curl -X "POST" \ "https://api.epicgames.dev/rtc/api/v1/<deploymentId>/room/<roomId>/participants/<ProductUserId>" \
-H "Content-Type: application/json" \
-d "{\"hardMuted\":true}"

modifyParticipant Response

204 - No Content

Example Response

204 No Content