Python requests oauth2 client credentials 400 bad request

Trying to make sense of why the token endpoint keeps rejecting my client credentials grant. I’m building a python wrapper for the graphql gateway and hitting /oauth/token with requests.

here is the payload:

import requests

url = 'https://api.mypurecloud.com/oauth/token'
headers = {'Content-Type': 'application/x-www-form-urlencoded'}
data = {
 'grant_type': 'client_credentials',
 'client_id': 'my_client_id',
 'client_secret': 'my_secret',
 'scope': 'admin:api'
}

resp = requests.post(url, headers=headers, data=data)
print(resp.status_code)
print(resp.text)

getting a 400 Bad Request. the response body says {"error":"invalid_grant","error_description":"..."}. i’ve double checked the client id and secret in the developer portal. they match. i’m in america/toronto timezone so maybe clock skew? no that’s usually for jwt verification.

is the scope string wrong? i need admin access for the gateway. tried adding routing:queue:view but same error. the docs are vague on the exact scope syntax for client credentials. any ideas why it’s failing validation?