REST Resource: spaces.members

Resource: Membership

Represents a membership relation in Google Chat, such as whether a user or Chat app is invited to, part of, or absent from a space.

JSON representation
{
  "name": string,
  "state": enum (MembershipState),
  "role": enum (MembershipRole),
  "createTime": string,

  // Union field memberType can be only one of the following:
  "member": {
    object (User)
  },
  "groupMember": {
    object (Group)
  }
  // End of list of possible types for union field memberType.
}
Fields
name

string

Resource name of the membership, assigned by the server.

Format: spaces/{space}/members/{member}

state

enum (MembershipState)

Output only. State of the membership.

role

enum (MembershipRole)

Output only. User's role within a Chat space, which determines their permitted actions in the space.

createTime

string (Timestamp format)

Output only. The creation time of the membership, such as when a member joined or was invited to join a space.

Union field memberType. Member associated with this membership. Other member types might be supported in the future. memberType can be only one of the following:
member

object (User)

The Google Chat user or app the membership corresponds to. If your Chat app authenticates as a user, the output populates the user name and type.

groupMember

object (Group)

The Google Group the membership corresponds to. Only supports read operations. Other operations, like creating or updating a membership, aren't currently supported.

MembershipState

Specifies the member's relationship with a space. Other membership states might be supported in the future.

Enums
MEMBERSHIP_STATE_UNSPECIFIED Default, don't use.
JOINED The user has joined the space.
INVITED The user has been invited, is able to join the space, but currently hasn't joined.
NOT_A_MEMBER The user isn't a member of the space, hasn't been invited and isn't able to join the space.

MembershipRole

Represents a user's permitted actions in a Chat space. More enum values might be added in the future.

Enums
MEMBERSHIP_ROLE_UNSPECIFIED Default value. For users: they aren't a member of the space, but can be invited. For Google Groups: they're always assigned this role (other enum values might be used in the future).
ROLE_MEMBER A member of the space. The user has basic permissions, like sending messages to the space. In 1:1 and unnamed group conversations, everyone has this role.
ROLE_MANAGER A space manager. The user has all basic permissions plus administrative permissions that let them manage the space, like adding or removing members. Only supported in SpaceType.SPACE.

Group

A Google Group in Google Chat.

JSON representation
{
  "name": string
}
Fields
name

string

Resource name for a Google Group.

Represents a group in Cloud Identity Groups API.

Format: groups/{group}

Methods

create

Creates a human membership or app membership for the calling app.

delete

Deletes a membership.

get

Returns details about a membership.

list

Lists memberships in a space.