I think that should be the problem:
def get_app_access_token():
params = {
“client_id”: config[“client_id”],
“client_secret”: config[“client_secret”],
“grant_type”: “client_credentials”
}
response = requests.post("https://id.twitch.tv/oauth2/token", params=params)
access_token = response.json()["access_token"]
return access_token
print(get_app_access_token())