Using the example in API doc
curl -H "Authorization: Bearer {My_Token}" https://{My_tenant}.auth0.com/api/v2/clients
Just to get the clients’ info. This works.
When I go through Python, though
url = urlparse.urljoin(My_tenant, 'api/v2/clients')
headers = {"Authorization": My_Token}
response = requests.get(url, headers=headers)
and I got {u'message': u'Bad audience: https://{My_Tenant}.auth0.com/api/v2/', u'error': u'Unauthorized', u'statusCode': 401}
I double checked my token in jwt.io and it’s just fine. It has all the permission. Why do I receive this message? I’m doing a GET
, how do I pass the audience param (usually in -d
) to the call?