participants.get
Read one participant in a room.
Import and client
import { RelayServer } from '@relayrtc/node'
const relay = new RelayServer({
apiUrl: process.env.RELAYRTC_API_URL!,
apiKey: process.env.RELAYRTC_SECRET_KEY!,
})Requirements
A secret key with participants:read. The requested resource must belong to that key's project environment.
Parameters
| Option | Type | Default / requirement | Purpose |
|---|---|---|---|
| roomId | string | Required | ID of a room in the key's environment. |
| participantId | string | Required | ID of a participant in this room. |
Every method accepts RequestOptions as its final argument.
Example
const roomId = 'room_example'
const participantId = 'participant_example'
const result = await relay.participants.get(roomId, participantId)Returns
Promise<Participant>. Returns a participant object.
REST equivalent
GET /v1/rooms/{roomId}/participants/{participantId}. Failures throw RelayApiError.