How can I make the message sending connection via Evolution API

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

Try this curl to blocks converter website, I hope it will help you,

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"
            ]
        }
    }
}

Show what you’ve already done. Here in the community there are complete guides on dictionaries. Have you already searched?

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"
      ]
    }
  }
}'

Show us message error

Verify your Json { } parameters.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.