How can I create a block for sending messages via WhatsApp json
curl --location 'https://url/message/sendText/instancia' \
--header 'Content-Type: application/json' \
--header 'apikey: <CHAVEAQUI>' \
--data '{
"number": "5585numero",
"options": {
"delay": 1200,
"presence": "composing",
"linkPreview": false
},
"textMessage": {
"text": "Plain text message, sent with the Evolution-API 🚀.\n\nHere you can send texts in bold, italic, ~strikethrough~ and
monospaced
.\n\nYou can also use any available emoticon on WhatsApp, like these examples below:\n\n😉🤣🤩🤝👏👍🙏"
}
}'
1 Like
JEWEL
(Extension Developer 🧩)
January 8, 2024, 4:23pm
#2
Try this curl to blocks converter website, I hope it will help you,
Hello Koders, Introducing Curl-to-Blocks , It converts curl requests into blocks that can be downloaded and added into your project.
Currently, supported options :
-d/–data/–data-binary
-F/–form
-H/–header
-I/–head
-u/–user
compressed
–url
-X/–request
[curlToBlocks]
Version: 1.0 [BETA]
Website: Curl-to-Blocks
This project is currently in beta version, so errors may arise.
1 Like
I did the header calmly, now I would need to assemble this dictionary in json
{
"number": "555444546",
"textMessage": {
"text": "Hello, World!"
},
"options": {
"delay": 0,
"presence": "composing",
"linkPreview": true,
"quoted": {
"key": {
"remoteJid": "string",
"fromMe": true,
"id": "string"
},
"message": {
"conversation": "string"
}
},
"mentions": {
"everyone": true,
"mentioned": [
"string"
]
}
}
}
Rogerio_Rios
(Professional Support)
January 10, 2024, 12:18pm
#4
Show what you’ve already done. Here in the community there are complete guides on dictionaries. Have you already searched?
0 — Basics
0.1 — What Is Dictionary
Dictionary is an object structured like JSON. Therefore, you have to know the basics of JSON. It is a way to store information in an organized, easy-to-access manner. It is formed with a key and a value and it is called a pair. The key is used to call the value. If you still don’t understand, search on Google for more information.
Dictionary in Kodular is a built-in block.
[image]
Object uses { bracket at the start, } at the end.
A colon is between the ke…
Recently Kodular has removed the Json component but has added the Dictionaries.
The Dictionaries can be used to obtain data from a Json in a simple way.
Using the dictionaries you don’t need to use any Json extension.
First of all, dictionaries are not a component. That’s why you won’t find it in the Designer.
You will find it in the block section:
[imagen]
In this example we are going to obtain the data from the Api newsapi.org
The idea is to get something like this:
[Tutorial Json Ap…
In the documentation it asks to pass this data and along with the api key header, I did it this way but I got an error
curl -X 'POST' \
'https://evo.evolution.com.br/message/sendText/evolution' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"number": "1234567890",
"textMessage": {
"text": "Hello, World!"
},
"options": {
"delay": 0,
"presence": "composing",
"linkPreview": true,
"quoted": {
"key": {
"remoteJid": "string",
"fromMe": true,
"id": "string"
},
"message": {
"conversation": "string"
}
},
"mentions": {
"everyone": true,
"mentioned": [
"string"
]
}
}
}'
Rogerio_Rios
(Professional Support)
January 10, 2024, 12:48pm
#8
Verify your Json { } parameters.
system
(system)
Closed
February 9, 2024, 12:49pm
#9
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.