I am following the documentation to make a application-only authentication but I keep getting a 408 response error code.
I am using python requests to post to https://api.twitter.com/oauth2/token to retrieve the bearer access token.
import requests
headers = {'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8', 'Authorization': 'Basic <<base64 encoded bearer token credentials>>', 'Content-Length': '29', 'Accept-Encoding': 'gzip', 'grant_type': 'client_credentials'}
requests.post("https://api.twitter.com/oauth2/token", headers=headers)
Please advise.