Last Updated on : 2024-06-24 04:10:53download
You can integrate Message Center into your WeChat mini program as a plug-in without additional development. This plug-in ensures that messages are delivered in a responsive way. You only need to pass in parameters to implement message reception and browsing for your WeChat mini program. The Message Center plug-in includes the Alarm, Home, and Bulletin modules to classify messages. This topic describes how to get started with the plug-in.
Follow the instructions in Plug-In to create an IoT WeChat mini program and request permissions to use the Message Center plug-in.
Add plug-in settings to app.json of your project.
plugins: {
'tuya-message-center': {
version: '1.0.1',
provider: 'wx88a79b7ae36fcbf5'
}
}
Add the code block for navigation to the plug-in:
wx.navigateTo({
url: `plugin://tuya-message-center/index?ticket=${ticket}&clientId=${clientId}`,
});
The navigation path includes the following parameters:
Parameter name | Type | Required | Description |
---|---|---|---|
clientId | string | Yes | The third-party unique identifier. It matches the value of AccessID for the WeChat Mini Program SDK on the Tuya Developer Platform. |
ticket | string | Yes | The third-party access token. For more information about how to get the token, see User Management. |
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback