All Products
Search
Document Center

ChatApp Message Service:GetChatappTemplateMetric

Last Updated:Jul 25, 2024

Queries the metrics about a marketing template.

Operation description

You can call this operation up to 50 times per second per account. If the number of calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
cams:GetChatappTemplateMetricget
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
TemplateCodestringYes

The template code.

744c4b5c79c9432497a075bdfca36bf5
LanguagestringNo

The template language.

en
IsvCodestringNo

The verification code used to verify whether the RAM user is authorized by the independent software vendor (ISV) account.

skdi3kksloslikdkkdk
CustSpaceIdstringNo

The space ID of the user within the ISV account.

293483938849493
TemplateTypestringNo

The template type. Valid values: WHATSAPP and VIBER. If you do not specify this parameter, WHATSAPP is used by default.

WHATSAPP
GranularitystringNo

The metric granularity.

Note Valid values:
  • DAILY
DAILY
StartlongYes

The beginning of the time range to query.

1693107714687
EndlongYes

The end of the time range to query.

1693407714687

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID.

90E63D28-E31D-1EB2-8939-A9486641****
Codestring

The value OK indicates that the request was successful.

OK
Messagestring

The error message.

None
Dataarray<object>

The returned data.

object

The data returned.

TemplateCodestring

The template code.

83837774838*****
Languagestring

The template language.

en
SentCountinteger

The number of sent messages.

10
ReadCountinteger

The number of read messages.

3
DeliveredCountinteger

The number of delivered messages.

6
Clientedarray<object>

The statistics on button clicks.

object
Typestring

The button type.

Note Valid values:
  • url_button

  • quick_relpy_button

  • phone_number_button

quick_reply_button
ButtonContentstring

The text on the button.

Open url
Countinteger

The number of clicks.

20
Startlong

The beginning of the time range you queried.

1673919240001
Endlong

The end of the time range you queried.

1668138331485
AccessDeniedDetailstring

The details about the access denial.

None

Examples

Sample success responses

JSONformat

{
  "RequestId": "90E63D28-E31D-1EB2-8939-A9486641****",
  "Code": "OK",
  "Message": "None",
  "Data": [
    {
      "TemplateCode": "83837774838*****",
      "Language": "en",
      "SentCount": 10,
      "ReadCount": 3,
      "DeliveredCount": 6,
      "Cliented": [
        {
          "Type": "quick_reply_button",
          "ButtonContent": "Open url",
          "Count": 20
        }
      ],
      "Start": 1673919240001,
      "End": 1668138331485
    }
  ],
  "AccessDeniedDetail": " None"
}

Error codes

HTTP status codeError codeError message
400Product.UnsubscriptYou have not subscribed to the specified product.
400Ram.PermissionDenyYou are not authorized to perform the operation.
400System.LimitControlThe system is under flow control.
400Unknown.ResourceOwnerIdThe resource does not belong to the current user.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
No change history