The QuickLink Studio API is a REST API. Our API has predictable resource-oriented URLs, returns JSON
encoded responses, and uses standard HTTP response codes and authentication.
Authentication
The QuickLink Studio API uses API Keys to authenticate requests. Each key has a 24 hour usage time
limit and after this period a new key should be requested.
GET /createNewToken/:username/:password
With a valid username and password a new 24 hour token will be created.
All other API requests will need to have the token in their header as below"Authorization: Bearer 4eC39HqLyjWDarjtT1zdp7dcntt586jfeew33"
Authentication
HTTP Status code summary
Publisher Object
All publishers will return a json object detailing full information about themselves.
Below is a sample publisher json object and then a section explaining each key contained in the
object.
{
"id":"Yed_ZPS0tIOgYSESAAAA",
"username":"bob",
“uid”:”u354”,
“token”:” gRCwWKr59tdPXXL”,
"friendlyName":"bob",
"customerID":"20",
"hand":false,
"configAudio":"true",
"configVideo":"true",
"pointOrder":false,
"intervention":false,
"type":"chrome",
"room":"",
"position":"",
"janusposition":"",
"status":"Ready",
"settings":{
"Audio Input":[
"Default - Microphone (CAMERA - UAC) (1b3f:2002)",
"Communications - Microphone (CAMERA - UAC) (1b3f:2002)",
"Microphone (CAMERA - UAC) (1b3f:2002)"
],
"Video Input":[
"CAMERA - UAC (1b3f:2002)",
"AudioOnly",
"Screen Capture"
],
"Mode":[
"2 Channel",
"Echo Cancellation",
"Lazy IFB"
],
"Resolution":[
"1080",
"720",
"360",
"180"
],
"Selected Audio Input":0,
"Selected Video Input":0,
www.quicklink.tv Page: 3
"Selected Mode":0,
"Selected Resolution":2,
"Audio Output":[
"Default - Speakers (High Definition Audio Device)",
"Speakers (High Definition Audio Device)",
],
"Selected Audio Output":0
},
"janusroom":"",
"warning":"none"
}
Id
Unique id identifying the publisher.
username
Unique username.
Uid
Unique id. Prefixed with g for guest, u for user and s for server or Studio-in-a-box.
Token
The unique token if this is a guest.
friendlyname
Name used to identify a user or Server in the Quicklink Portal.
customerID
The id of the customer this publisher belongs to.
hand
Indicates whether this publisher has their hand raised or not.
configAudio
true if audio is on, false if audio is muted.
configVideo
true if video is on, false if video is off.
pointOrder
Indicates whether the publisher wishes to raise a point of order.
intervention
Indicates whether the publisher wishes to make an intervention.
type
The type of device the publish is connecting with.
room
A unique identifier for the high quality room the publisher is in. Will be empty if they are not in a high
quality room.
position
Indicates what position the publisher is in if they are in a high quality room. Will be position 1 or 2.
janusposition
Indicates what position the publisher is in if they are in a distributor room. Will be between 0 and the
max number of position in the distributor room.
status
Indicates whether the publisher is in a ‘Ready’ state or a ‘In Call’ state.
Settings
Contains an object with all the device setting for the publisher.
Audio Input
A list of the publishers audio input devices.
Video Input
A list of the Video Input devices.
Mode
Types of audio processing available.
Resolution
Video resolutions available.
Selected Audio Input
A number indicating which audio input device is currently selected.
Selected Video Input
A number indicating which video input device is currently selected.
Selected Mode
A number indicating which audio mode is currently selected.
Selected Resolution
A number indicating which video resolution is currently selected.
Audio Output
A list of the available audio output devices for the publisher.
Selected Audio Output
A number indicating which audio output device is currently selected.
janusroom
A unique identifier for the distributor room the publisher is in. Will be empty if they are not in a
distributor room.
warning
Indicates if there is packetloss of greater than 2% during a 20 second period with the value “warning”
otherwise will be “none”.
Publisher Object
{
roomid: 500,
position_1:alice,
position_2:bob,
datarate:2Mb
}
Roomid
The unique id of the room.
Position_1
The username of the publisher in position 1 of the room
Position_2
The username of the publisher in position 2 of the room
datarate
The bitrate the publisher should try and achieve in the room
API Methods
GET user/:uid
Returns the publisher object for :uid if they are logged into the system otherwise it will return will
return “:username is not logged in”.
GET users
Returns a list of all the users logged in with their usernames and uid’s.
GET room/:roomid
Returns the room object for the specific :roomid.
GET rooms
Returns a list of all the room objects
POST joinroom/:uid/:roomid
Move publisher object ( :uid) to a room identified by :roomid
If the room has capacity a 200-OK will be returned otherwise the request will fail.
POST lockrooom/:roomid
Locks a point to point room if the room is full.
POST unlockroom/:roomid
Unlocks a room if it is locked
POST createroom
Creates a point to point room
POST deleteroom/:roomid
Delete a point to point room
POST updateroomname/:roomid/:name
Updates the name of a point to point room
POST leaveroom/:uid/:roomid
Remove a publisher object (:uid) from a room (:roomid)
Returns 200-OK if successful
POST roomdatarate/:roomid/:datarate
Change the data rate of a point to point room (:roomid).
Values for :datarate can be anything from the following list
{128k,256k,500k,1M,2M,3M,4M,5M,6M,7M,8M,9M,10M}
POST roomaudiodatarate/:roomid/:audiodatarate
Change the audio data rate for a point to point room (:roomid)
Values for :audiodatarate can be anything from the following list
{32k,64k,128k,256k,512k}
POST startcall/:roomid
If there are two users in the room (:roomid) not in a call, a call will be started.
POST stopcall/:roomid
If there are two users in a room (:roomid) in a call the call will be stopped.
GET distrooms
Return a list of all the distributor rooms.
POST joindistributor/:uid/:roomid/:position
Move publisher object ( :uid) to a distributor room identified by :roomid and specify the position for
them to go into.
If the room has capacity a 200-OK will be returned otherwise the request will fail.
POST leavedistributor/:uid/:roomid/:position
Move publisher object ( :uid) out of a distributor room identified by :roomid and specify the position
they were in.
If the room has capacity a 200-OK will be returned otherwise the request will fail.
POST updateuser
Send a publisher object in the header with any changes you wish to make to the publisher. Camera
selection, audio input selection etc.
Returns 200-OK if successful
POST mute/:uid/:audio/:video
Mute a publisher’s audio or video by sending true or false for that user’s audio and video
True means the video or audio is on and false means it is off.
Returns 200-OK if successful
POST muteroom/:roomid/:audio1/:video1/:audio2/:video2
Setup the mute options for a room (:roomid)
True means the video or audio is on and false means it is off.
POST createguest
Create a guest or multiple guests
Send json object of the form
{guests: [
{'startdate':'2020-12-01 11:00:00', 'enddate':'2020-12-01 15:00:00', 'name':'testguest'},
{'startdate':'2020-12-01 11:00:00', 'enddate':'2020-12-01 15:00:00', 'name':'bobguest'}
]}
On successful creation you will receive a list containg the created guests in the form:
{uid: "g987", token: "QCgmStuxmXDqduz", name: "testguest"}
A link can then be created of the form
https://quicklink.network/portal/Communicator.php?Token= QCgmStuxmXDqduz
to use the created guest.
SocketIO for User Updates
Version 2 or earlier of socketio can be used to receive updates so you know when a user has loged in
or made a change
Connect to apipsio.quicklink.network on port 443 with a socketio client.
You will get a connect message back when the socketio is fully connected.
When you have the connect message you can emit the following to create a token
Socketioclinet.emit(“createNewToken”, {username:’username’, password:’password’})
When the token has successfully been created you will receive a token message with the token as the
data included with it.
Once you have this send a connecttoapi message with the token included and you will receive any
user information from that point onwards.
Socketioclient.emi(‘connectapi’,token)
When a user connects or updates you will receive a UserUpdate message
Socketioclient.on(‘UserUpdate”, function(data){
//data will contain a publisher object
});
When a user disconnects you will receive UserDisconneted
Socketioclient.on(‘UserDisconnected”, function(data){
//data will contain the uid of the publisher
});