# updatableMessage.createActivityId
Call this API at the server side. For more information, see Server API.
This API supports Cloud Calls. The WeChat DevTools version must be
1.02.1904090
or later (download the latest stable version here), and thewx-server-sdk
version must be0.4.0
or later.
Creates the activity_id for a shared updatable message. For details, see Updatable Message.
Calling methods:
# HTTPS Call
# Request Address
GET https://api.weixin.qq.com/cgi-bin/message/wxopen/activityid/create?access_token=ACCESS_TOKEN
# Request Parameters
Attribute | Type | Default | Required | Description |
---|---|---|---|---|
access_token | string | Yes | Credentials to call API |
# Return Value
# Object
JSON data package that is returned
Attribute | Type | Description |
---|---|---|
activity_id | string | The ID of an updatable message. |
expiration_time | number | The expiration timestamp of the activity_id. The activity_id expires after 24 hours by default. |
errcode | number | Error code |
Valid values of errcode
Value | Description | Minimum Version |
---|---|---|
0 | Request successful | |
-1 | System is busy. Try again later. | |
42001 | access_token expired. |
# Cloud Call
Cloud call is a capability provided by Mini Program·Cloud Base that allows you to call WeChat APIs in a cloud function. It must be used via
wx-server-sdk
in the cloud function.
# API Calling Method
openapi.updatableMessage.createActivityId
You need to configure the permissions for the
updatableMessage.createActivityId
API viaconfig.json
. Details
# Return Value
# Object
JSON data package that is returned
Attribute | Type | Description |
---|---|---|
activityId | string | The ID of an updatable message. |
expirationTime | number | The expiration timestamp of the activity_id. The activity_id expires after 24 hours by default. |
errCode | number | Error code |
Valid values of errCode
Value | Description | Minimum Version |
---|---|---|
0 | Succeeded |
# Exceptions
# Object
Thrown Exceptions
Property | Type | Description |
---|---|---|
errCode | number | Error code |
Valid values of errCode
Value | Description | Minimum Version |
---|---|---|
-1 | System is busy. Try again later. | |
42001 | access_token expired. |