Directory Api's members().hasMember(group, email) returns error "Invalid Input: memberKey"
See original GitHub issueCall to “hasMembers” returns error
{
"code" : 400,
"errors" : [ {
"domain" : "global",
"message" : "Invalid Input: memberKey",
"reason" : "invalid"
} ],
"message" : "Invalid Input: memberKey"
}
While call to members/get with the same parameters returns good response
adminApi().members().get(group, email).execute()
Version “directory_v1-rev89-1.23.0”
building api like this (scala)
def adminApi() = {
new Directory.Builder(Utils.getDefaultTransport, Utils.getDefaultJsonFactory, groupsCredential)
.setApplicationName(gcpProjectId)
.build
}
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:16
Top Results From Across the Web
Method: members.hasMember - Directory API
Membership can be direct or nested, but if nested, the memberKey and groupKey must be entities in the same domain or an Invalid...
Read more >Google Admin SDK Directory API: Adding group as member ...
I can go into the Admin web interface and change the membership to owner, so the system apparently is ok with it. What...
Read more >hasMember does not work if memberKey domain is outside of ...
When direct member of a group has, say, gmail.com address and the group is from a domain, "invalid input" error is reported. This...
Read more >Invalid Input: memberKey - Google Groups
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group. To unsubscribe from this group and...
Read more >members() - Google APIs
Membership can be direct or nested, but if nested, the `memberKey` and `groupKey` must be entities in the same domain or an `Invalid...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yeah, but the only reason I use google groups is the ability to add emails from different domains. And I should be able to check it, right? I ended up using different endpoint to get all groups for the email address, and it works as expected. adminApi().groups().list().setUserKey(email).execute()
I ran into this problem today and posted a bug on the issue tracker https://issuetracker.google.com/issues/109861216
It is not a language problem, because I’m using REST. I also got around it by using list then looping through the results.