WebRTC Clients
This describes the web services that relate to Aculab Cloud WebRTC Clients.
WebRTC clients can use the WebRTC Interface
to register to receive calls from Aculab Cloud applications or other clients, and to place calls to other WebRTC clients.
Enabling incoming calls and placing calls to other clients requires time-limited tokens.
The web services here provide the ability to generate these tokens and to list those clients that are currently registered for calls.
Note
This is a low level API. For information on higher level APIs see the Web Services Language Wrappers
WebRTC Generate Token
This generates a token to allow a WebRTC client to register for incoming calls or place calls to other WebRTC clients.
Note
Note that developer accounts can only generated a limited number of tokens per month. See Account Types for full details.
Authorisation
This API uses basic authentication, using your cloud account username and API Access Key.
Username | : | cloudID/username (e.g. 1-2-0/ |
Password | : | API Access key |
Request:
Url | : | https://ws.aculabcloud.net/ |
Methods | : | GET, POST |
Parameter | Required/Optional | Default | Description |
---|---|---|---|
client_id | required | The client id of the WebRTC client that will use the token. This
is the same as the clientId used when creating the WebRTC client. | |
ttl | optional | 3600 | The time, in seconds, that the token is valid for. This must be between 600 and 86400. |
enable_incoming | optional | true | "true" to make the token valid for enabling incoming calls to the client, else "false". |
call_client | optional | The client id of a WebRTC client that can be called. The last character can be a '*' wildcard in which case it matches any client whose id starts with the string. Just a '*' which matches all clients. Multiple identifiers can be specified by either a comma separated list or by repeating this parameter. If no value is given the token cannot be used for calling other clients. |
Returns:
A JSON object with the following parameter:
Parameter | Type | Description |
---|---|---|
token | string | the generated token. |
Example:
https://ws.aculabcloud.net/webrtc_generate_token?client_id=myClientId&ttl=1200
Response:
{
"token": "eyJhbGciOiJSUzI1NiIsImtpZCI6Ik45dHZUcGhxX2ZKRjdrcEFZZ1c4aWRQVU1GZnE5MHFNTGRjWlpjSk81ckEiLCJ0eXAiOiJKV1QifQ.eyJhdWQiOiIwLTAtMCIsImV4cCI6MTU4Mzg0MzYwNywiaWF0IjoxNTgzODQwMDA3LCJpc3MiOiJmZzhjZTl0c3pzeDNrazB4aXFsaHEyd3BzIiwibmJmIjoxNTgzODQwMDA3LCJzY29wZSI6WyJ3ZWJydGNjbGllbnQiXSwic3ViIjoibXlDbGllbnRJZCJ9.LdzXDXy0eeNYKCyAoGcYqMSS11aSeBiGQFCU-qlBGpDxM1KqMwG3mZBUZ68At27q4zEU-vwRuy1_3imcKfX2LXwkFRL5gO-fPxI2RBuOU9PWMHnwRgpQHGT8Fr8ETBiEqhP-KpBkXj3wUzTK3zeyq9_dWqXvsfB0VVObgs5QZUk"
}
WebRTC Registered Clients
This returns a list of clients that are currently registered for calls.
Authorisation
This API uses basic authentication, using your cloud account username and API Access Key.
Username | : | cloudID/username (e.g. 1-2-0/ |
Password | : | API Access key |
Request:
Url | : | https://ws.aculabcloud.net/ |
Methods | : | GET, POST |
Returns:
A JSON array of objects describing registered clients. The objects have the following parameters:
Parameter | Type | Description |
---|---|---|
client_id | string | the client id used to register the client. |
last_modified | string | the time, in the format YYYY-MM-DD_hh:mm:ss, when the registration was last modified. |
expires | string | the time, in the format YYYY-MM-DD_hh:mm:ss, when the registration will expire. |
Example:
https://ws.aculabcloud.net/webrtc_registered_clients
Response:
[
{
"client_id": "myClientId",
"last_modified": "2020-03-10_11:35:33",
"expires": "2020-03-10_11:55:33"
}
]