500 internal error in simple sendMessage API call: Cannot read properties of undefined (reading 'textMessage')
Welcome!
- [x] Yes, I have searched for similar issues on GitHub and found none.
What did you do?
Hi Guys, i'm using latest release (docker atendai/evolution-api:latest) and updated an instance from the web ui with my whatsapp (Bailys). the instance shows connected after i scanned the QR code.
sending simple curl SendText request:
curl --request POST
--url http://<MY_EVOLUTION_URL>/message/sendText/<INSTNACE_ID>
--header 'Content-Type: application/json' --header 'apikey: <EVOLUTION_API_KEY>' --data '{
"number": "972528888888",
"text": "Hi, Test",
"delay": 1
}'
result: {"status":500,"error":"Internal Server Error","response":{"message":"Cannot read properties of undefined (reading 'textMessage')"}}
What did you expect?
200 response.
What did you observe instead of what you expected?
500 (internal server error)
Screenshots/Videos
No response
Which version of the API are you using?
2.2.3
What is your environment?
Windows
Other environment specifications
No response
If applicable, paste the log output
No response
Additional Notes
No response
The same ++
Also happened to me with the latest docker image.
{
"status": 500,
"error": "Internal Server Error",
"response": {
"message": "Connection Closed"
}
}
I resolved this issue by updating CONFIG_SESSION_PHONE_VERSION, then reconnecting the instance. This issue seems to be related: https://github.com/EvolutionAPI/evolution-api/issues/1014
The issue was fixed. python webhooks(/websocket) and stated above curl command are matching Evolution version 1 API instead of version 2
O que você fez para corrigir o problema?
Ainda to com o mesmo problema:
curl --request POST \
--url https://<MY_EVOLUTION_URL>/message/sendText/<INSTNACE_ID> \
--header 'Content-Type: application/json' \
--header 'apikey: <EVOLUTION_API_KEY>' \
--data '{
"number": "5585997961111",
"text": "Fala meu mano"
}'
Minha imagem:
image: evoapicloud/evolution-api:latest
Versão do whatsapp:
CONFIG_SESSION_PHONE_VERSION=2.3000.1020885143
Toda vez que tento chamar esse curl, caio nessa msg:
{"status":500,"error":"Internal Server Error","response":{"message":"Cannot read properties of undefined (reading 'textMessage')"}}
Obrigado.
try like this:
curl --request POST
--url https://{server-url}/message/sendText/{instance**_NAME**}
--header 'Content-Type: application/json'
--header 'apikey:
--data '{
"number": "
{"status":400,"error":"Bad Request","response":{"message":[["instance requires property "text""]]}}
I'm facing this error bellow when I try to send text message to a group:
{"status":400,"error":"Bad Request","response":{"message":["Error: not-acceptable"]}}
I think it might be related to this issue
{"status":400,"error":"Solicitação inválida","response":{"message":[["instância requer propriedade "texto""]]}}
same here, did you manage to solve it?
I managed to solve it by changing the instance, I had put a uuid when it was just the name