我如何使用 Zoho Deluge 执行此 API?
How Can I execute this API using Zoho Deluge?
你能帮我一下吗?我确实尽了最大的努力来启动这个功能 运行?
以下是我浏览过的文章-
https://www.zoho.com/creator/help/script/invoking-a-function.html
curl --location --request POST 'https://gw.cmtelecom.com/v1.0/message' \
--header 'Content-Type: application/json' \
--data-raw '{
"messages": {
"authentication": {
"producttoken": "test"
},
"msg": [
{
"from": "00919538893819",
"to": [
{
"number": "00918892449978"
}
],
"body": {
"type": "auto",
"content": "This is a WhatsApp message"
},
"allowedChannels": [
"WhatsApp"
],
"richContent": {
"conversation": [
{
"template": {
"whatsapp": {
"namespace": "5c198301_106c_4fc2_a2f6_7556d8847746",
"element_name": "otp",
"language": {
"policy": "deterministic",
"code": "en"
},
"components": [
{
"type": "body",
"parameters": [
{
"type": "text",
"text": "Dhanush"
},
{
"type": "text",
"text": "627728289"
}
]
}
]
}
}
}
]
}
}
]
}
}'
有没有其他方法可以执行此操作?
您应该先用 JSON 数据定义一个变量,然后将数据作为字符串传递给 invokeUrl。
参见以下示例:
void APICall()
{
data = {"messages":{"authentication":{"producttoken":"******"},"msg":{{"from":"00919538893819","to":{{"number":"00918892449978"}},"body":{"type":"auto","content":"This is a WhatsApp message"},"allowedChannels":{"WhatsApp"},"richContent":{"conversation":{{"template":{"whatsapp":{"namespace":"5c198301_106c_4fc2_a2f6_7556d8847746","element_name":"otp","language":{"policy":"deterministic","code":"en"},"components":{{"type":"body","parameters":{{"type":"text","text":"Dhanush"},{"type":"text","text":"627728289"}}}}}}}}}}}}};
response = invokeUrl
[
url: "https://gw.cmtelecom.com/v1.0/message"
type: POST
parameters: data.toString()
headers: {"Content-Type": "application/json"}
];
info response;
}
请不要在您的问题中 post API 身份验证令牌!
你能帮我一下吗?我确实尽了最大的努力来启动这个功能 运行?
以下是我浏览过的文章- https://www.zoho.com/creator/help/script/invoking-a-function.html
curl --location --request POST 'https://gw.cmtelecom.com/v1.0/message' \
--header 'Content-Type: application/json' \
--data-raw '{
"messages": {
"authentication": {
"producttoken": "test"
},
"msg": [
{
"from": "00919538893819",
"to": [
{
"number": "00918892449978"
}
],
"body": {
"type": "auto",
"content": "This is a WhatsApp message"
},
"allowedChannels": [
"WhatsApp"
],
"richContent": {
"conversation": [
{
"template": {
"whatsapp": {
"namespace": "5c198301_106c_4fc2_a2f6_7556d8847746",
"element_name": "otp",
"language": {
"policy": "deterministic",
"code": "en"
},
"components": [
{
"type": "body",
"parameters": [
{
"type": "text",
"text": "Dhanush"
},
{
"type": "text",
"text": "627728289"
}
]
}
]
}
}
}
]
}
}
]
}
}'
有没有其他方法可以执行此操作?
您应该先用 JSON 数据定义一个变量,然后将数据作为字符串传递给 invokeUrl。
参见以下示例:
void APICall()
{
data = {"messages":{"authentication":{"producttoken":"******"},"msg":{{"from":"00919538893819","to":{{"number":"00918892449978"}},"body":{"type":"auto","content":"This is a WhatsApp message"},"allowedChannels":{"WhatsApp"},"richContent":{"conversation":{{"template":{"whatsapp":{"namespace":"5c198301_106c_4fc2_a2f6_7556d8847746","element_name":"otp","language":{"policy":"deterministic","code":"en"},"components":{{"type":"body","parameters":{{"type":"text","text":"Dhanush"},{"type":"text","text":"627728289"}}}}}}}}}}}}};
response = invokeUrl
[
url: "https://gw.cmtelecom.com/v1.0/message"
type: POST
parameters: data.toString()
headers: {"Content-Type": "application/json"}
];
info response;
}
请不要在您的问题中 post API 身份验证令牌!