You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 2, 2023. It is now read-only.
Hi I've trying to send rich content with messaging agent API "PublishEvent". I followed the example code in github, updated dialogId, however it failed to send rich content and socket closed with code 4410, see the log in following image. Can you please help take a look? Note that, I'm able to send plain text successfully.
Besides, regarding the parameters in "publishEvent", what does 'MY_CARD_ID' mean? What id should I use?
Hi @MengjiaoZhou, Image URLs needs to be whitelisted. did you white list the URL in the configurations?
Regarding MY_CARD_ID: it is your ability to add metadata on the line (not mandatory), it can help you later to track the cards you sent.
Hi I've trying to send rich content with messaging agent API "PublishEvent". I followed the example code in github, updated dialogId, however it failed to send rich content and socket closed with code 4410, see the log in following image. Can you please help take a look? Note that, I'm able to send plain text successfully.
Besides, regarding the parameters in "publishEvent", what does 'MY_CARD_ID' mean? What id should I use?
Here's the code snippet:
agent.publishEvent({
dialogId: dialogId,
event: {
type: LpEventTypeEnum.RichContentEvent,
content: {
"type": "vertical",
"elements": [
{
"type": "image",
"url": "http://cdn.mos.cms.futurecdn.net/vkrEdZXgwP2vFa6AEQLF7f-480-80.jpg?quality=98&strip=all",
"tooltip": "image tooltip",
"click": {
"actions": [
{
"type": "navigate",
"name": "Navigate to store via image",
"lo": 23423423,
"la": 2423423423
}
]
}
},
{
"type": "text",
"text": "product name (Title)",
"tooltip": "text tooltip",
"style": {
"bold": true,
"size": "large"
}
},
{
"type": "text",
"text": "product name (Title)",
"tooltip": "text tooltip"
},
{
"type": "button",
"tooltip": "button tooltip",
"title": "Add to cart",
"click": {
"actions": [
{
"type": "link",
"name": "Add to cart",
"uri": "http://www.google.com"
}
]
}
},
{
"type": "horizontal",
"elements": [
{
"type": "button",
"title": "Buy",
"tooltip": "Buy this product",
"click": {
"actions": [
{
"type": "link",
"name": "Buy",
"uri": "http://www.google.com"
}
]
}
},
{
"type": "button",
"title": "Find similar",
"tooltip": "store is the thing",
"click": {
"actions": [
{
"type": "link",
"name": "Buy",
"uri": "http://www.google.com"
}
]
}
}
]
},
{
"type": "button",
"tooltip": "button tooltip",
"title": "Publish text",
"click": {
"metadata": [
{
"type": "ExternalId",
"id": "MY_ACTION_ID"
}
],
"actions": [
{
"type": "publishText",
"text": "my text"
}
]
}
},
{
"type": "button",
"tooltip": "button tooltip",
"title": "Navigate",
"click": {
"actions": [
{
"type": "publishText",
"text": "my text"
},
{
"type": "navigate",
"name": "Navigate to store via image",
"lo": 23423423,
"la": 2423423423
}
]
}
}
]
}
}
}, null, [{type: 'ExternalId', id: 'MY_CARD_ID'}]);
The text was updated successfully, but these errors were encountered: