I’m trying to send chat message from my EBS.
Reading
I correctly created JWT with user_id and role and used it as Authorization header.
Added Client-Id and Content-Type headers.
Added broadcaster_id query parameter.
Added text, extension_id and extension_version in json body.
When sending the POST I receive this error {"error":"Bad Request","status":400,"message":"extension_name cannot be empty"}
There is no extension_name in the docs, I tried to put it in json body but I get the same error.
You want the broadcaster_id to be a string if it isn’t
And you want to only pass/set it in the body not the query string as well that might be throwing a confusion into Twitch. So remove the req->setParameter('broadcaster_id line and retest.
Otherwise we need to check you JWT generation logic.
Hello, sorry for delay.
I tried everything, I removed broadcaster_id from reqBody, I removed Authorization header and got error "401 Authorization header is required" so token is ok. I removed extension_id from reqBody and got an error "400 extension_id parameter is required" so json body is created correctly.
As soon as I provide all required parameters I get the same error:
{"error":"Bad Request","status":400,"message":"extension_name cannot be empty"}
The problem is that I get the error even if I put this param in body or in query params.