Skip to content

Claim the ringtone

POST
/rooms/calls/{room}/ringtone/check
curl --request POST \
--url https://collab.work.optidata.cloud/api/rooms/calls/a3050cd3-5921-4153-b90a-owt42-e94de63c7b15/ringtone/check \
--header 'Authorization: Bearer <token>'

Asks whether this device should play the ringtone for an incoming call. When a user has several Optiwork windows or devices open, each one asks; the first to ask gets 204 and plays the ringtone, and the others get 403 for the next 30 seconds, so the ringtone plays once.

Release the claim with endCall when the call is answered or stops ringing. You must be a party of the call.

room
required
string

The room’s hash (from its link) or its permanent-link identifier custom_hash.

Play the ringtone on this device.

No authentication key was sent, or it is malformed.

Media typeapplication/json

Authentication failures use an error key rather than message.

object
error
required
string
Examples
Examplemissing

No bearer token sent

{
"error": "JWT passport exception: Missing bearer token in request"
}

Another of your windows or devices is already playing the ringtone, or you are not a party of the call.

Media typeapplication/json
One of:

An error raised by the application’s own rules.

object
error
required

What went wrong.

string
status

The HTTP status, repeated.

integer
help

What to do about it, when there is a hint.

string
Examples

Already ringing elsewhere

{
"error": "You are not allowed to play the ringtone at this moment",
"status": 403,
"help": ""
}

No room has this hash or permanent link.

Media typeapplication/json

A refused or not-found request.

object
message
required
string
Examples
ExamplenotFound
{
"message": ""
}

The authentication key is expired or not recognised. Get a fresh one and retry.

Media typeapplication/json

Authentication failures use an error key rather than message.

object
error
required
string
Examples
Exampleexpired
{
"error": "JWT passport expired: Passport expired"
}