1
Auth0で認証を行い、ユーザーデータを取得しようとしています。私は入れません何Auth0 - スコープが不十分で、それにどう対応するのですか?
import json
import requests
payload = {
'grant_type': 'password',
'username': '********',
'password': '********',
'client_id': '********',
'connection': 'Username-Password-Authentication',
'scope': 'openid'
# 'scope': 'openid, read:clients, read:client_keys'
# 'scope': 'read:clients'
}
base = 'https://********.auth0.com'
url = base + '/oauth/ro'
response = requests.post(url, data=payload)
response = json.loads(response.content)
headers = {"Authorization": "bearer " + response["id_token"]}
response = requests.get(base + '/api/v2/clients/joebloggs', headers=headers).json()
print response
は正確に間違っている、それについて何をすべきかどう
{u'errorCode': u'insufficient_scope', u'message': u'Insufficient scope, expected any of: read:clients,read:client_keys', u'error': u'Forbidden', u'statusCode': 403}
のですか?