google-api-java-client: Directory Api's members().hasMember(group, email) returns error "Invalid Input: memberKey"
Call 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
}
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 1
- Comments: 16
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.
@Sparticuz I saw your issue and “upvoted”. I was just asking @sduskis if it’s possible he pushes it to the right team since he seems to work at Google.
I already filed a bug upstream last year: https://issuetracker.google.com/issues/109861216
My guess as to why it hasn’t been fixed is probably privacy related.
So finding a workaround now counts as fixing the issue?