{ errors:
[ { domain: 'global',
reason: 'required',
message: 'Missing required field: member' } ],
code: 400,
message: 'Missing required field: member' }
I get this error when I run the following request:
var request = client.admin.members.insert({
groupKey: "some_group@example.com"
, email: "me@example.com"
});
I was authenticated successfully (I received the access token and so on) but when I execute the request above it callbacks that error.
What member
field am I supposed to add?
It works fine in API Explorer using groupKey
and email
fields.
email
is part of the form data. The form data must be passed as object in the second argument:The documentation at https://developers.google.com/admin-sdk/directory/v1/reference/members/insert for
admin.members.insert
indicates that it requires agroupKey
parameter, but that the body (which the node.js library handles as a separate object) should contain amembers
object containing therole
property. See the API Explorer a the bottom of that page as well.