Closed ArkjuniorK closed 2 years ago
Hi @ArkjuniorK, thanks for reporting the bug.
I've added missing TypeScript types to HSMComponentParameter, and asked our support why video doesn't work for you. I will let you know once I have more details
I've added missing TypeScript types to HSMComponentParameter, and asked our support why video doesn't work for you. I will let you know once I have more details
Thank you.
@ArkjuniorK our support get back to me, and they confirmed that it should work for you.
Here is example curl command to API:
curl -X "POST" "https://conversations.messagebird.com/v1/send" \
-H 'Authorization: AccessKey ...' \
-H 'Content-Type: application/json; charset=utf-8' \
-d $'{
"content": {
"hsm": {
"language": {
"code": "en"
},
"components": [
{
"type": "header",
"parameters": [
{
"type": "video",
"video": {
"url": "URL_TO_VIDEO"
}
}
]
},
{
"type": "body",
"parameters": [
{
"type": "text",
"text": "SOME TEXT"
},
{
"type": "text",
"text": "ANOTHER TEXT"
}
]
}
],
"namespace": "NAMESPACE_ID",
"templateName": "TEMPLATE_NAME"
}
},
"to": "+PHONE_NUMBER",
"type": "hsm",
"from": "CONTACT_ID"
}'
Here is example curl command to API:
Thanks for your answer. So we should use the curl to send media video instead of Node SDK?
No! This is just example of how to structure the request body.
Also the way to confirm that problem is not with SDK if your curl attempt will not work. If it works - problem is with SDK and we will dig deeper together to try to find it.
Can you please try to use curl and let me know the results?
Here is example curl command to API:
I tried the code and still did not work. My message keep rejected when I check the Inbox
So this means it is something with your call and not nodejs SDK. Can you please reach out to MessageBird support? https://support.messagebird.com/hc/en-us/requests/new?ticket_form_id=1900000147753 They should be able to help you better, I do not have the means to test your call or access to your details. I will push the changes with a TS typings fix.
So this means it is something with your call and not nodejs SDK. Can you please reach out to MessageBird support? https://support.messagebird.com/hc/en-us/requests/new?ticket_form_id=1900000147753 They should be able to help you better, I do not have the means to test your call or access to your details. I will push the changes with a TS typings fix.
Thanks for your feedback
messagebird-nodejs
unable to sent message template with media video. Also the interface ofhsm
did not had the video type forheader
so when we use snippet below thetype
key would throw an error.We are using Typescript for our codebase. So adding video type for
HSMComponentParameter[]
should fix the problem with syntax but still the message did not sent to the user. Is there something we should do? Or it is not supported yet? Thanks for the advice.