dialogflow-es - 我如何发送自定义数据和推送通知?
问题描述
我有一个用例,我需要在 Google Assistant 中使用 ActionOnSDK 发送自定义数据和推送通知,我如何发送它任何人有任何线索?
let notification = {
userNotification: {
title: 'A new tip is added',
},
target: {
userId: 'abcd1234-EFGH_789',
intent: 'tell_latest_tip',
// Expects a IETF BCP-47 language code (i.e. en-US)
locale: 'en-US'
},
};
request.post('https://actions.googleapis.com/v2/conversations:send', {
'auth': {
'bearer': tokens.access_token,
},
'json': true,
'body': {
'customPushMessage': notification
}
};
解决方案
推荐阅读
- python - 向现有 SharePoint xlsx 文件添加新数据
- localization - 使用 i18n 本地化 Fluent UI 组件属性
- vb.net - 如何使用 vb.net(类、模块和表单)将数据获取到我的数据库
- android - 使用 Jetpack Compose 1.0.0-alpha11 时如何手动导入扩展函数?
- python - 如何从我的 pandas 数据框中清除前缀?
- c - 如何使用 MinGW 编译器在程序开始时调用特定函数?
- hy - Hy中的字典合并
- html - 不知道为什么我的英雄部分的 CSS 背景没有出现
- python - Pandas 经纬度分箱到 100x100 分箱
- javascript - 单击时使用开机复制到剪贴板