Skip to content

[BUG] send text message error 400 #2570

@gabee-jg

Description

@gabee-jg

📋 Bug Description

Desejo enviar uma mensagem de texto simples. Uso o código fornecido na documentação e mesmo assim me retorna erro

🔄 Steps to Reproduce

import requests

url = "http://localhost:8080/message/sendText/gabi"

payload = {
"number": "5522999999999",
"textMessage": { "text": "teste" },
"delay": 123,
"quoted": {},
"linkPreview": True,
"mentioned": [""]
}
headers = {
"apikey": "senha",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)

✅ Expected Behavior

Deveria enviar a mensagem, na teoria ta tudo certo principalmente por ter sido da documentação oficial.

❌ Actual Behavior

{"status":400,"error":"Bad Request","response":{"message":[["instance requires property "text""]]}}

🌍 Environment

  • OS: Windows 11
  • Node.js version: [e.g. 18.17.0]
  • Evolution API version: 2.3.7
  • Database: MySQL 8.0
  • Connection type: Baileys

📋 Logs

📝 Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions