Client_credentials grant failing with 401 despite valid tuple

Does anyone understand why the auth tuple in requests.post keeps throwing a 401 for the client_credentials grant? i’ve verified the client_id and secret are correct, and the endpoint is https://api.mypurecloud.com/oauth/token. the code is straightforward:

requests.post(url, auth=(cid, sec), data={'grant_type': 'client_credentials'})

it works fine in postman but fails in python.