我正在尝试使用gsuite目录api向组中添加成员。当我从localhost运行时,它工作得很好。我的React不太好
{
"email": "SUser47@xxx.org",
"etag": "\"KXerOJ--uaTsC20LSIhZ0glQU94e8VcBOkFuJ9bRTN0/JkFTvv9f6ckddPl66l1esjGJWrc\"",
"id": "117999918144210502865",
"kind": "admin#directory#member",
"role": "MEMBER",
"type": "USER",
"status": "ACTIVE"
}
但当我把这个上传到WebSphereServer并运行同样的东西时,它会给出下面的响应。
403 Forbidden
POST https://www.googleapis.com/admin/directory/v1/groups/03vac5uf1al10ml/members
{
"code" : 403,
"errors" : [ {
"domain" : "global",
"message" : "Insufficient Permission",
"reason" : "insufficientPermissions"
} ],
"message" : "Request had insufficient authentication scopes.",
"status" : "PERMISSION_DENIED"
}
我检查了范围,我觉得没问题。有人建议我还应该检查哪些东西吗。
下面是我的credentials.json文件
{"installed":{"client_id":"xxx",
"project_id":"studentupdate","auth_uri":"https://accounts.google.com/o/oauth2/auth",
"token_uri":"https://oauth2.googleapis.com/token",
"auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs",
"client_secret":"xxxx","redirect_uris":["urn:ietf:wg:oauth:2.0:oob","http://localhost"]}}
谢谢您
暂无答案!
目前还没有任何答案,快来回答吧!