Been trying to subscribe to couple events via webhooks.
Got my listener on 443 forwarding events to my service and i see the response as well as the challenge, so im trying to respond to it by doing a POST request but no matter what i’ve tried i keep getting the following error:
Response Status: 400 Bad Request
Response Header: map[Content-Length:[175] Content-Type:[application/json; charset=utf-8] Date:[Mon, 22 Apr 2024 04:07:23 GMT] Strict-Transport-Security:[max-age=300] Timing-Allow-Origin:[https://www.twitch.tv] Vary:[Accept-Encoding, Origin] X-Cache:[MISS, MISS] X-Cache-Hits:[0, 0] X-Served-By:[cache-bfi-krnt7300024-BFI, cache-chi-klot8100142-CHI] X-Timer:[S1713758843.141811,VS0,VS0,VE59]]
Response Body: {"error":"Bad Request","status":400,"message":"Must provide a valid Content-Type header with a request body. Please use application/json or application/x-www-form-urlencoded"}
these are the headers i’m passing.
req.Header.Set("Content-Type", "text/plain")
req.Header.Set("Authorization", "Bearer <something>")
req.Header.Set("Client-Id", "<else>")
any guidance would be appreciated!