right  Talk To Us!

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.

 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 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/bob@example.com)
    Password : API Access key

    Request:

    Url:https://ws.aculabcloud.net/webrtc_generate_token
    Methods:GET, POST

    ParameterRequired/OptionalDefaultDescription
    client_idrequiredThe client id of the WebRTC client that will use the token. This is the same as the clientId used when creating the WebRTC client.
    ttloptional3600The time, in seconds, that the token is valid for. This must be between 600 and 86400.
    enable_incomingoptionaltrue"true" to make the token valid for enabling incoming calls to the client, else "false".
    call_clientoptionalThe 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:

    ParameterTypeDescription
    tokenstringthe 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/bob@example.com)
    Password : API Access key

    Request:

    Url:https://ws.aculabcloud.net/webrtc_registered_clients
    Methods:GET, POST

    Returns:

    A JSON array of objects describing registered clients. The objects have the following parameters:

    ParameterTypeDescription
    client_idstringthe client id used to register the client.
    last_modifiedstringthe time, in the format YYYY-MM-DD_hh:mm:ss, when the registration was last modified.
    expiresstringthe time, in the format YYYY-MM-DD_hh:mm:ss, when the registration will expire.

    Example:

    https://ws.aculabcloud.net/webrtc_registered_users

    Response:

      [
        {
          "client_id": "myClientId",
          "last_modified": "2020-03-10_11:35:33",
          "expires": "2020-03-10_11:55:33"
        }
      ]