All Products
Search
Document Center

SetMessageCallback

Last Updated: Jul 11, 2019

Description

You can call this operation to set the callback method, callback URL, and event type of an event notification.

For more information, see Event notification development guide.

Request parameters

Parameter Type Required Description
Action String Yes The operation that you want to perform. Set this parameter to SetMessageCallback.
CallbackType String Yes The callback method. Valid values: HTTP and MNS.
CallbackURL String Yes When you set the CallbackType parameter to HTTP, this parameter indicates the callback URL.
MnsEndpoint String No When you set the CallbackType parameter to MNS, this parameter indicates the Internet endpoint of Message Service (MNS).
MnsQueueName String No When you set the CallbackType parameter to MNS, this parameter indicates the name of the MNS queue.
EventTypeList String Yes The type of the callback event. If you do not set this parameter, all types of event notifications are disabled. If you set this parameter to ALL, all types of event notifications are enabled. You can also specify the event notification types to be enabled. Separate multiple event notification types with commas (,). Valid values: all the supported event types.
AuthSwitch String No When you set the CallbackType parameter to HTTP, this parameter indicates whether to enable callback authentication. Valid values: on and off.
AuthKey String No When you set the CallbackType parameter to HTTP, this parameter indicates the cryptographic key. The value has the maximum length of 32 characters and must contain uppercase letters, lowercase letters, and digits.
AppId String No The ID of the application. If you do not set this parameter, the default application ID app-1000000 is used.

To obtain notifications of AI-related events, such as AIMediaAuditComplete and AIMediaDNAComplete, set EventTypeList to AIComplete.

Response parameters

Parameter Type Description
RequestId String The ID of the request.

API examples

Sample request

http://vod.cn-shanghai.aliyuncs.com/?Action=SetMessageCallback&CallbackType=HTTP&CallbackURL=test.com&EventTypeList=ALL&Format=JSON&

Note: For more information about common request parameters, see Common parameters.

Sample response

JSON format

{
     "RequestId": "25818875-5F78-4A13-BEF6-D7393642CA58"
    }