So adding curl -X into the code, so the full line being sent to the server is:
curl POST https://id.twitch.tv/oauth2/token?client_id=MYID&client_secret=MYSECRET&grant_type=client_credentials HTTP/1.1
Host: id.twitch.tv
Content-Type: application/json
Accept: application/json
Connection: close
Gets the response:
Headers: HTTP/1.1 400 Bad Request Headers: Server: awselb/2.0 Headers: Date: Sat, 05 Dec 2020 21:47:37 GMT Headers: Content-Type: text/html Headers: Content-Length: 122 Headers: Connection: close headers received reply was: ========== <html> <head><title>400 Bad Request</title></head> <body> <center><h1>400 Bad Request</h1></center> </body> </html> ========== closing connection