Updated on 2026-09-02 GMT+08:00

Message Signature Verification

Scenarios

To ensure security, SMN provides signature verification for subscription confirmation, subscription cancellation, notification, and subscriber messages. Message recipients must verify the signatures of messages sent by SMN. Supported message types include subscription confirmation messages, subscription cancellation messages, notification messages, subscriber confirmation messages, and subscriber cancellation messages. You can use the information in an SMN message to verify its authenticity through the signature string.

Procedure

After receiving an HTTP/HTTPS message, check it with the following procedure:

  1. Verify the key-value pairs (which vary depending on the message type) contained in the message signature. For details, see Signature Strings for Different Message Types.
  2. Download the X509 certificate from the certificate URL (signing_cert_url) contained in the message.

    The request to download the certificate is always sent over HTTPS. When you download a certificate, verify the identity of the certificate server.

  3. Extract the public key from the X509 certificate for verifying the message reliability and integrity.
  4. Determine which method will be used to verify the signature based on the message type (the type field in the message).
  5. Create signature strings. Obtain the signature parameters from the message and sort them in alphabetical order. Each parameter occupies a line, with its value following in the next line.

Signature Strings for Different Message Types

  1. Notification messages
    • A notification message signature must contain the following parameters (If subject is left blank, omit subject in the signature):
      message
      message_id
      subject
      timestamp
      topic_urn
      type
    • Example signature information for a notification message
      message
      My test message
      message_id
      88c726942175432bac921eafd0036163
      subject
      demo
      timestamp
      2016-08-15T07:29:16Z
      topic_urn
      urn:smn:regionId:74dc9e44d0cc4573adfce91cdfdd3ba9:xxxx
      type
      Notification

      Each parameter occupies a line, with its value following in the next line.

  2. Subscription confirmation and subscription cancellation messages
    • A subscription confirmation or subscription cancellation message signature must contain the following parameters:
      message
      message_id
      subscribe_url
      timestamp
      topic_urn
      type
    • Example signature information for a subscription confirmation message
      message
      You are invited to subscribe to topic: urn:smn:regionId:d91989905b8449b896f3a4f0ad57222d:demo. To confirm this subscription, please visit the following SubscribeURL in this message.
      message_id
      def5c309cbff44d5a870787ed937edf8
      subscribe_url
      https://IP address/smn/subscription/confirm?Region ID&Token&Topic URN:demo
      timestamp
      2016-08-15T07:29:16Z
      topic_urn
      urn:smn:regionId:d91989905b8449b896f3a4f0ad57222d:demo
      type
      SubscriptionConfirmation

      Each parameter occupies a line, with its value following in the next line.

  3. Subscriber confirmation messages
    • A subscriber confirmation message must contain the following parameters:
      message
      message_id
      subscribe_url
      timestamp
      type
    • Example subscriber confirmation message:
      message
      You are invited to be a subscriber that belongs to test_******. To confirm your subscription, click subscribe_url within one year. Keep this URL safe as you will need it for future requests.
      message_id
      1ca9e463f2a84ef69f43b65caf9b2064
      subscribe_url
      https://console.******.com/smn/subscription/confirm?topic_urn=urn:smn:region01:6e******:test_******&token=******
      timestamp
      2026-01-01T00:00:00Z
      type
      HttpSubscriptionUserConfirm

      Each parameter occupies a line, with its value following in the next line.

  4. Subscriber cancellation messages
    • A subscriber cancellation message must contain the following parameters:
      message 
      message_id 
      timestamp 
      type
    • Example subscriber cancellation message:
      message
      You have confirmed to be a subscriber. To cancel the confirmation, click unsubscribe_url within one year. Keep this URL safe as you will need it for future requests.
      message_id
      fb28c8e29af542dc80290a8e5b1b8d82
      timestamp
      2026-01-01T00:00:00Z
      type
      HttpSubscriptionUserUnsubscribe

      Each parameter occupies a line, with its value following in the next line.