Query streaming key
Updated
Queries information for a specified Media Gateway streaming key.
https://api.agora.io/{region}/v1/projects/{appId}/rtls/ingress/streamkeys/{streamkey}This method queries the current list of ongoing Media Gateway streams, including the associated UID, channel name, stream status, bitrate, and audio and video metrics.
Path Parameters
regionstringRegion for the streaming key or stream. Supported values are na for North America, eu for Europe, ap for Asia except mainland China, and cn for mainland China.
Important
Make sure that:
- The
regionvalue is the same as for the input source stream. - The domain names for setting the
regionparameter and streaming are the same. - The
regionvalue is in lowercase.
appIdstringThe app ID provided by Agora to each developer. After creating a project in Agora Console, you can get an app ID. The app ID is a unique identifier for a project.
streamkeystringThe streaming key.
Header Parameters
X-Request-IDstringThe UUID (Universally Unique Identifier) of the request. After you pass in this field, the Agora server returns this field in the response header. It is recommended to assign X-Request-ID a value. If omitted, the Agora server automatically generates a UUID and returns it.
Response Body
The request succeeded and returned streaming key information.
Response Headers
statusstringRequest status. success means the request succeeds.
dataobjectstreamKeystringThe streaming key.
channelstringAgora channel name associated with the streaming key.
uidstringUser UID associated with the streaming key.
expiresAfterintegerValidity period of the streaming key in seconds.
createdAtstringUnix timestamp, in seconds, when the streaming key was created.
Request examples
curl --location 'https://api.agora.io/ap/v1/projects/9d2498880e934632b38b0a68fa2f1622/rtls/ingress/streamkeys/:streamkey'Response example
{ "status": "success", "data": { "streamKey": "2dfMTR****fys", "channel": "shx001", "uid": "1001", "expiresAfter": 0, "createdAt": "1686820170" }}