Force disconnect
Updated
Disconnects an ongoing Media Gateway stream by SID.
https://api.agora.io/{region}/v1/projects/{appId}/rtls/ingress/online-streams/{sid}You can combine this method with deleting the streaming key to implement the function of disabling the stream. Deleting the streaming key only removes it from the database. You can no longer use the streaming key, but you cannot disconnect the ongoing push. To disconnect, use one of the following methods:
- Call to delete the streaming key and then call this method to disconnect the ongoing push.
- Call to kick the user out of the channel. This API can also force the user to disconnect. If the kicking API has been integrated, you can continue to use it to disconnect the stream.
Important
Make sure to delete the streaming key first; otherwise, after using this API to force a disconnection, the push software will immediately reconnect. A new push session, corresponding to a new SID, will be generated, and the disconnection will fail.
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.
sidstringThe streaming session ID. Each initiated streaming task generates a unique SID.
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 sent the disconnection command.
Response Headers
statusstringThe status of this request. success means the request succeeds.
Request examples
curl --request DELETE \ --url https://api.agora.io/region/v1/projects/appId/rtls/ingress/online-streams/sid \ --header 'Accept: application/json' \ --header 'Authorization: Basic 123' \ --header 'X-Request-ID: 'Response example
{ "status": "success"}