错误400:请求包含无效的参数-Google Cloud Identity API

时间:2020-07-09 19:32:26

标签: google-cloud-platform google-api google-oauth google-apis-explorer google-cloud-identity

我已经编写了一个nodejs脚本来访问Google Cloud Identity API。此nodejs应用使用Oauth2.0客户端访问API,并且具有足够的范围来访问Google Cloud Identity API。一个API请求如下所示:

const url = "https://cloudidentity.googleapis.com/v1beta1/groups/[GROUPID]/memberships/[USERID]";
const res = await oauth2Client.request({ url });
console.log(res.text);

GROUPID的格式为“ abc@mydomain.com”,USERID的格式为“ abcuser@mydomain.com”

以下是我得到的错误:

code: 400,
   errors: [
     {
       message: 'Request contains an invalid argument.',
       domain: 'global',
       reason: 'badRequest'
     }
   ]

0 个答案:

没有答案