does the OTP template work?
From the java code, the template looks as below, and "language" and "components" are in "custom", and I failed to send OTP with this format.
{ "message_type": "custom", "channel": "whatsapp", "from": "", "to": "", "custom": { "type": "template", "template": { "name": "" }, "language": { "code": "en", "policy": "deterministic" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "123456" } ] }, { "type": "button", "sub_type": "url", "index": "0", "parameters": [ { "type": "text", "text": "123456" } ] } ] } }
while I tried with another format as https://github.com/Vonage/vonage-curl-code-snippets/blob/main/messages/whatsapp/send-authentication-template.sh
the format is as below, "language" and "components" were in "template", and it worked as expected.
{ "message_type": "custom", "channel": "whatsapp", "from": "", "to": "", "custom": { "type": "template", "template": { "name": "", "language": { "code": "en", "policy": "deterministic" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "123456" } ] }, { "type": "button", "sub_type": "url", "index": "0", "parameters": [ { "type": "text", "text": "123456" } ] } ] } } }
Hi team,
does the OTP template work? From the java code, the template looks as below, and "language" and "components" are in "custom", and I failed to send OTP with this format.
{ "message_type": "custom", "channel": "whatsapp", "from": "", "to": "", "custom": { "type": "template", "template": { "name": "" }, "language": { "code": "en", "policy": "deterministic" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "123456" } ] }, { "type": "button", "sub_type": "url", "index": "0", "parameters": [ { "type": "text", "text": "123456" } ] } ] } }
while I tried with another format as https://github.com/Vonage/vonage-curl-code-snippets/blob/main/messages/whatsapp/send-authentication-template.sh the format is as below, "language" and "components" were in "template", and it worked as expected.
{ "message_type": "custom", "channel": "whatsapp", "from": "", "to": "", "custom": { "type": "template", "template": { "name": "", "language": { "code": "en", "policy": "deterministic" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "123456" } ] }, { "type": "button", "sub_type": "url", "index": "0", "parameters": [ { "type": "text", "text": "123456" } ] } ] } } }