Query the details of the SMS template

Last Updated on : 2023-06-20 12:39:04download

Query the details of the SMS template.

API address

GET: /v1.0/iot-03/msg-templates/sms/{template_id}

Request parameter

Parameter nameTypeINRequiredDescription
template_idStringuritrueTemplate ID.

Return parameter

Parameter nameTypeDescription
resultSmsTemplateDetailRes

Description of result

Parameter nameTypeDescription
nameStringThe template name with 1 to 30 characters.
contentStringThe template content with 1 to 500 characters.
typeIntegerThe SMS type. 0: Verification code. 1: SMS notification. 2: Promotional message.
statusIntegerThe review status of the template. 0: The review is in progress. 1: Passed the review. 2: Failed to pass the review. View the reasons for failure in verify_reason.
verify_codeIntegerThe review code. For more information, see the list of review codes.
verify_reasonStringDescribe the reason why the review is not passed.

Request example

GET: /v1.0/iot-03/msg-templates/sms/SMS_12313****

Return example

{
    "result": {
        "verify_code": 100,
        "type": 0,
        "content": "You are registering with your phone number. The verification code is: ${code}, valid for 5 minutes.",
        "verify_reason": "Illegal words",
        "name": "The test template of the verification code when registering through SMS",
        "status": 2
    },
    "t": 1586153261345,
    "success": true
}

Error code

For more information, see error code.