Support & information center

Passing dynamic infrastructure data to qualityRTC

Often times, we find ourselves integrating qualityRTC with proprietary infrastructure of our clients. This may be credentials to TURN servers, configuration and access of media servers, dynamic lists of DNS addresses, etc.

To make the integration easier, we’ve created a standardized REST API call that we invoke from our backend to the client’s backend which collects that information each time a user runs a qualityRTC network test. To make the integration easier and smoother, it is advisable to implement this REST API according to the following rules:


The request is an HTTPS request sent from our backend to your backend.

The end user’s browser is not part of that API call, but the response returned by this REST API call will be sent to the end user’s browser for the purpose of conducting the network tests.

You can choose an arbitrary URL and you will need to support an optional region URL variable. One of the straightforward ways to implement this REST API is by way of an AWS Lambda or other serverless infrastructure.

Code language: JavaScript (javascript)

The above request will ask for the configuration associated with a region called us-east. If no region is provided, then you should give a default region.


The response of your REST API call should be in a form of a JSON structure:

{ turnCredentials: [ { username: "<>", credential: "<>", urls: [ "turn:coturn01.****.com:443?transport=udp", "turn:coturn01.****.com:443?transport=tcp", "turns:coturn01.****.com:443?transport=tcp" ], }, ], datacenterRegions: [ { code: "east-us", title: "east-us", url: ["https://east-us.speed.****.com"], }, ], videoQuality: { username: "<>", credential: "<>", urls: [ "", "turn:coturn01.****.com:443?transport=udp", "turn:coturn01.****.com:443?transport=tcp", "turns:coturn01.****.com:443?transport=tcp", ], mediaserver: "https://****.com/" }, dnsLookupDomains: ["", "", ""], }
Code language: JSON / JSON with Comments (json)

Each of the blocks in the JSON structure is optional. You should implement and return only the ones relevant to your specific infrastructure. Anything else will be statically provisioned by qualityRTC through configuration defined during the initial setup of the service.


If you are using your own TURN servers (or our installable ones), then you will need to pass the TURN servers and their credentials to us using this variable.

The TURN credentials provided will be used wherever they are needed in the tests conducted, unless other specific credentials are given for a test.


Assuming you are installing our speed testing machines, then you can provide the selection logic for them through the datacenterRegions parameter.

The url field returns as a list of servers. qualityRTC can pick and choose between them using AWS Route 53 or similar logical services if needed.


When using your own media servers for the VIDEO QUALITY test, such as Jitsi, Janus, mediasoup, …; you can provide the access information necessary to connect to your media server for the purpose of testing.


If you need to dynamically change and manage the DNS LOOKUP test then you can use this to generate the list of addresses to test against.

Was this article helpful?

Related Articles