Open pavankpdev opened 5 months ago
when was the last time you tried this? im unable to replicate the problem
@smashah I tried this two weeks ago, please try to call the API to send Poll to replicate this issue. I used the CLI to bootstrap the project
Both sending poll and reason the poll API doesn't work.
@smashah I tried the same using the docker version of openwa, I get this below error when I try sendPoll
{
"args": {
"to": "919686855796@g.us",
"name": "string",
"localId": "123",
"options": ["dad", "DAdad"],
"allowMultiSelect": "boolean"
}
}
{
"success": false,
"error": {
"name": "TypeError",
"message": "Please set arguments in request json body, not in params. Cannot read properties of undefined (reading 'id')\nj (https://static.whatsapp.net/rsrc.php/v3i8Ri4/yB/l/rt/HOH2o6x2WEY.js?_nc_x=Ij3Wp8lg5Kz:172:1135)\nObject.<anonymous> (https://static.whatsapp.net/rsrc.php/v3i8Ri4/yB/l/rt/HOH2o6x2WEY.js?_nc_x=Ij3Wp8lg5Kz:172:561)"
}
}
Are you using the latest version of the library?
What type of session are you experiencing this issue on?
Legacy (Normal)
What type of host account are you experiencing this issue on?
Personal account (normal)
Mode
EASY API/CLI
Current Behavior
I'm trying to call the
/sendPoll
API from Swagger, but it fails with the following error:Request Body
Response
I tried the same request with Postman and cURL, and the result is the same error.
Expected Behavior
The expected behavior is that the API should successfully post a poll in my group chat, allowing group members to vote on where we should eat.
Steps To Reproduce
npx @open-wa/wa-automate -w https://webhook.site/87c9b01e-ba82-415a-9d0e-af6cabd4f2ce -p 8008
sendPoll
APIcreate() code OR full CLI command + CONFIG
DEBUG INFO
Environment
Screenshots/Logs
Anything else?
Additional Attempts
I also tried sending the request using Postman and cURL with the same request body, but I encountered the same error message each time. It seems the API is not accepting the arguments as they are currently structured in the request body.