All Products
Search
Document Center

Unsubscribe

Last Updated: Oct 08, 2019

Unsubscribe

Description

This API is used to cancel a subscription.

Request

A request includes the following parts:

  • Request line

    DELETE /topics/$TopicName/subscriptions/$SubscriptionName HTTP/1.1

  • Special request header

    None. For details, refer to Call method/Public parameters.

  • Request Body None

Response

The response message includes three parts: return status line, HTTP header, and message body.

  • HTTP Status Code

    HTTP/1.1 204 No Content

    If the subscription to be canceled does not exist, Status Code 204 is returned and the Unsubscribe operation is successful.

  • Special response header

    None. For details, refer to Call method/Public parameters.

  • Response Body

    None

Request example:

  1. DELETE /topics/$TopicName/Subscriptions/$SubscriptionName HTTP/1.1
  2. Host: $AccountId.mns.cn-hangzhou.aliyuncs.com
  3. Date: Tue, 08 Dec 2015 06:18:04 GMT
  4. Authorization: MNS 15B4D3461F177624206A:UOEb7OmC9GX7G9BLY3XryP6vtjQ=
  5. x-mns-version: 2015-06-06

Response example:

  1. HTTP/1.1 204 No Content
  2. x-mns-request-id: 5666761CB2B71C9C16000035
  3. x-mns-version: 2015-06-06