Zoho API COQL authorization problem

Zoho API COQL authorization problem

Hello!

I am encountering a problem while executing a COQL endpoint request. I'd like to execute a simple COQL request, but whenever I try sending a POST request I get this response:
  1. {'code': 'OAUTH_SCOPE_MISMATCH', 'details': {}, 'message': 'invalid oauth scope to access this URL', 'status': 'error'}
I am using a Python script to authenticate:
  1. def get_proper_access_token(
        refresh_token, client_id, client_secret, scope, redirect_uri
    ):
        url = "https://accounts.zoho.com/oauth/v2/token"
        headers = {"Content-Type": "application/x-www-form-urlencoded"}
        data = {
            "refresh_token": refresh_token,
            "client_id": client_id,
            "client_secret": client_secret,
            "scope": scope,
            "redirect_uri": redirect_uri,
            "grant_type": "refresh_token",
        }

        response = requests.post(url, data=data, headers=headers)
        return response.json()
And I receive proper tokens from that function. It works flawlessly for all other endpoints.
I pass these scopes while trying to generate token for /coql endpoint:
  1. ZohoCRM.coql.READ,ZohoCRM.settings.fields.READ,ZohoCRM.modules.Products.ALL
I will appreciate any help with the issue.