code: def get_token(code, token_service, client_id, client_secret, redirect_uri,
                grant_type):
    
    data = {
        'code': code,
        'client_id': client_id,
        'client_secret': client_secret,
        'redirect_uri': redirect_uri,
        'grant_type': grant_type,
    }
    # Get the default http client
    resp = requests.post(token_service, data, verify=False)
    return resp.json()
docs: Fetches an OAuth 2 token.