logo
Voice Call
Server API
Stream Mixing and Transcoding APIs
On this page

SetForbidStreamRule

GET

https://rtc-api.zego.im/

Set the Stream publishing prohibition rule.

After setting successfully, you can query Stream publishing prohibition rules or delete Stream publishing prohibition rules.

Rate Limit
For all Rooms under the same AppID: 10 times/second.
Notice

Usage of DisableAudio and DisableVideo parameters:

  • At least one parameter must be set to 1, otherwise calling this interface will result in an error.
  • For the same Stream ID, if this interface is called multiple times to set different prohibition rules (with different DisableAudio and DisableVideo parameter values each time), the settings from the last call will prevail.

Request

Query Parameters

    Action stringrequired

    Possible values: [SetForbidStreamRule]

    API Prototype Parameter

    https://rtc-api.zego.im?Action=SetForbidStreamRule

    AppId uint32required

    💡Public parameter. Application ID, assigned by ZEGOCLOUD. Get it from the ZEGOCLOUD Admin Console.

    SignatureNonce stringrequired

    💡Common parameter. A 16-character hexadecimal random string (hex-encoded 8-byte random number). For the generation algorithm, refer to the signature example.

    Timestamp int64required

    💡Common parameter. Current Unix timestamp in seconds. For the generation algorithm, refer to the signature example. A maximum deviation of 10 minutes is allowed.

    Signature stringrequired

    💡Common parameter. Signature used to verify the legitimacy of the request. Please refer to the signature mechanism to generate it.

    SignatureVersion stringrequired

    Possible values: [2.0]

    Default value: 2.0

    💡Public parameter. Signature version number.

    RoomId stringrequired

    Room ID.

    StreamId stringrequired

    Possible values: <= 256 characters

    Stream ID, maximum length not exceeding 256 bytes.

    DisableAudio int32

    Possible values: [0, 1]

    Default value: 0

    Whether to prohibit audio. 0: Do not prohibit (default); 1: Prohibit.

    DisableVideo int32

    Possible values: [0, 1]

    Default value: 0

    Whether to prohibit video. 0: Do not prohibit (default); 1: Prohibit.

    EffectiveTime int64

    Possible values: >= 1 and <= 86400

    Default value: 21600

    Effective duration of the prohibition rule, in seconds. Default 21600. Range 1 ~ 86400 (values exceeding 24 hours will be automatically adjusted to 24 hours).

Responses

Operation successful
Schema
    Code int32

    Return code. The following only lists some return codes related to the interface business logic. For complete return codes, please refer to Global Return Codes.

    Return CodeDescriptionSuggested Action
    0Request successful.-
    1Request failed.Please contact ZEGOCLOUD technical support for assistance.
    2Input parameter error.-
    9Permission to use this interface not granted.Please contact ZEGOCLOUD technical support for assistance.
    123Failed to set Stream information.Please retry, or contact ZEGOCLOUD technical support for assistance.
    206App request QPS too high and rate limited.Reduce request frequency, or contact ZEGOCLOUD technical support to increase the QPS limit threshold.
    Message string

    Operation result description.

    RequestId string

    Request ID.

Previous

Overview

Next

DescribeForbidStreamRules

On this page

Back to top