OAuth authorization code flow isnt working

@BarryCarlyon But https://id.twitch.tv/oauth2/token?client_id=CLIENTID&client_secret=SECRET&code=CODE&grant_type=authorization_code&redirect_uri=http://localhost/connect.php is a post, or not?