question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Directory Api's members().hasMember(group, email) returns error "Invalid Input: memberKey"

See original GitHub issue

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
  }

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:16

github_iconTop GitHub Comments

4reactions
vitamoncommented, May 10, 2018

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()

3reactions
Sparticuzcommented, Jun 7, 2018

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found