Oauth 2.0 正在请求Auth0授权扩展中的组列表,但返回403:范围不足错误
我已经在Auth0帐户中安装了Oauth 2.0 正在请求Auth0授权扩展中的组列表,但返回403:范围不足错误,oauth-2.0,authorization,auth0,Oauth 2.0,Authorization,Auth0,我已经在Auth0帐户中安装了Authorization扩展,因此授权功能非常有效,但现在我想访问我在该授权扩展中创建的所有组。因此,我遵循了授权文档,但当我使用为此生成的令牌时,它会抛出403:作用域不足错误作为响应 以下是我经历的步骤: 1.请求令牌: curl -X POST \ https://my_domain.auth0.com/oauth/token \ -H 'cache-control: no-cache' \ -H 'content-type: applicat
Authorization
扩展,因此授权功能非常有效,但现在我想访问我在该授权扩展中创建的所有组。因此,我遵循了授权文档,但当我使用为此生成的令牌时,它会抛出403:作用域不足
错误作为响应
以下是我经历的步骤:
1.请求令牌:
curl -X POST \
https://my_domain.auth0.com/oauth/token \
-H 'cache-control: no-cache' \
-H 'content-type: application/json' \
-d '{
"client_id":"auth0-authorization-extension-api-client-id",
"client_secret":"auth0-authorization-extension-api-secret",
"audience":"urn:auth0-authz-api",
"grant_type":"client_credentials"
}'
答复:
{"access_token":"encoded_access_token","expires_in":86400,"token_type":"Bearer"}
{
"statusCode": 403,
"error": "Forbidden",
"message": "Insufficient scope"
}
2.请求的组列表:
curl -X GET \
https://domain.us.webtask.io/some_hash/api/groups \
-H 'authorization: Bearer access_token'
答复:
{"access_token":"encoded_access_token","expires_in":86400,"token_type":"Bearer"}
{
"statusCode": 403,
"error": "Forbidden",
"message": "Insufficient scope"
}
希望这对您来说不是问题,但如果是: