Skip to main content

POST : API to Generate Access Token


POST
    https://<appname>.metered.live/api/v1/token

<appname> - replace it the name of your app.

Description

This endpoint allows you to generate an access Token

Parameters

ParametersDescriptionRequiredOptions
Query
secretKeystringyour secret keyyes-
Bodyapplication/json
isAdminbooleanis this user admin in the meeting. Admin can allow other users without a token in private meetings, and meeting can be create where only admin can broadcast. (share their screen, audio or video)nofalse | true
roomNamestringname of the room you want to limit the token tono-
globalTokenbooleancreate a token that is valid for all the rooms in the appnofalse | true
namestringName of the user. When the user joins the meeting this will be name of the userno-
emailstringEmail you want to set for the user, can be used in your applicationno-
metastringmeta info you want to associate with the participantno-
externalUserIdstringuserId you want set for the participantno
expireUnixSecintegerunix timestamp in seconds. user cannot join the room after this time is reached.no-
notBeforeUnixSecintegerunix timestamp in seconds. user cannot join the meeting before this time.no-
ejectAfterElapsedTimeInSecintegerEject user automatically after the specified seconds. Suppose you want to eject the user automatically after 30 mins then you will set this value to 1800 (30 mins in seconds)no-
joinVideoOnbooleaniframe only option.nofalse | true
joinAudioOnbooleaniframe only option.nofalse | true
disableVideobooleaniframe only option.nofalse | true
disableAudiobooleaniframe only option.nofalse | true
disableScreenSharingbooleaniframe only option.nofalse | true

Request Samples

cURL
curl --request POST \
--url 'https://appname.metered.live/api/v1/token?secretKey={replace_this_with_your_secretKey}' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{"globalToken":true}'

Responses

200
{
"token": ""
}
400

{
"success": false,
"message": "Invalid request"
}