I have setup my google developers account. Enabled Admin API and also gave credentials with localhost as Authorized origin.
我已经设置了我的Google开发者帐户。已启用Admin API,并且还将localhost作为授权来源提供凭据。
I am trying to explore the Directory API to fetch the list of groups. But it always throws 400 BadRequest error.
我正在尝试探索Directory API以获取组列表。但它总是抛出400 BadRequest错误。
Also, I have tried with JavaScript as follows.
另外,我尝试使用JavaScript如下。
gapi.auth.authorize with the CLIENT_ID and scopes as admin.directory.group, admin.directory.group.readonly
gapi.client.load('admin', 'directory_v1', function(){
var request = gapi.client.directory.groups.list();
request.execute(function(resp) {
// usage of resp object
});
});
This also gives me the same error. [resp object returns BadRequest error object].
这也给了我同样的错误。 [resp对象返回BadRequest错误对象]。
I am using the correct CLIENT_ID and also gave Authorized origins. What am I doing wrong or missing in this?
我使用了正确的CLIENT_ID,并且还提供了授权来源。我在做错了什么或者错过了什么?
~Madhu
1 个解决方案
#1
0
Are you authenticating as a super admin user or a delegated admin user who has permissions to read groups?
您是作为超级管理员用户还是具有读取组权限的委派管理员用户进行身份验证?
#1
0
Are you authenticating as a super admin user or a delegated admin user who has permissions to read groups?
您是作为超级管理员用户还是具有读取组权限的委派管理员用户进行身份验证?