Create Group > Bad Request #196
|
Hi, Someone had ever have this kind of trouble ? |
Replies: 1 comment
|
Hi @owalencikecn — your payload format looks correct on the surface. The A few things to check:
If you can drop the exact error response body + your version, I can pinpoint the cause right away. 🙂 |
Hi @owalencikecn — your payload format looks correct on the surface. The
CreateGroupDtoaccepts participant IDs in the628123456789@c.usformat (exactly what you're using), so the400 Bad Requestisn't coming from the DTO validation itself.A few things to check:
Content-Type header. Make sure your request includes
Content-Type: application/json. Without it, the body isn't parsed as JSON and the DTO receives an empty object — which does fail validation with a 400.curl -X POST http://localhost:2785/api/sessions/{sessionId}/groups \\ -H "X-API-Key: YOUR_KEY" \\ -H "Content-Type: application/json" \\ -d '{"name":"My Group","participants":["33612345678@c.us"]}'The full error body. …