Reference documentation and code samples for the Google Apps Chat V1 Client class GetMembershipRequest.
Request to get a membership of a space.
Generated from protobuf message google.chat.v1.GetMembershipRequest
Namespace
Google \ Apps \ Chat \ V1
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ name
string
Required. Resource name of the membership to retrieve. To get the app's own membership by using user authentication, you can optionally use spaces/{space}/members/app. Format: spaces/{space}/members/{member} or spaces/{space}/members/app You can use the user's email as an alias for {member}. For example, spaces/{space}/members/example@gmail.com where example@gmail.com is the email of the Google Chat user.
↳ use_admin_access
bool
Optional. When true, the method runs using the user's Google Workspace administrator privileges. The calling user must be a Google Workspace administrator with the manage chat and spaces conversations privilege. Requires the chat.admin.memberships or chat.admin.memberships.readonlyOAuth 2.0 scopes. Getting app memberships in a space isn't supported when using admin access.
getName
Required. Resource name of the membership to retrieve.
To get the app's own membership by using user
authentication,
you can optionally use spaces/{space}/members/app.
Format: spaces/{space}/members/{member} or spaces/{space}/members/app
You can use the user's email as an alias for {member}. For example,
spaces/{space}/members/example@gmail.com where example@gmail.com is the
email of the Google Chat user.
Returns
Type
Description
string
setName
Required. Resource name of the membership to retrieve.
To get the app's own membership by using user
authentication,
you can optionally use spaces/{space}/members/app.
Format: spaces/{space}/members/{member} or spaces/{space}/members/app
You can use the user's email as an alias for {member}. For example,
spaces/{space}/members/example@gmail.com where example@gmail.com is the
email of the Google Chat user.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getUseAdminAccess
Optional. When true, the method runs using the user's Google Workspace
administrator privileges.
The calling user must be a Google Workspace administrator with the
manage chat and spaces conversations
privilege.
Requires the chat.admin.memberships or chat.admin.memberships.readonlyOAuth 2.0
scopes.
Getting app memberships in a space isn't supported when using admin access.
Returns
Type
Description
bool
setUseAdminAccess
Optional. When true, the method runs using the user's Google Workspace
administrator privileges.
The calling user must be a Google Workspace administrator with the
manage chat and spaces conversations
privilege.
Requires the chat.admin.memberships or chat.admin.memberships.readonlyOAuth 2.0
scopes.
Getting app memberships in a space isn't supported when using admin access.
Parameter
Name
Description
var
bool
Returns
Type
Description
$this
static::build
Parameter
Name
Description
name
string
Required. Resource name of the membership to retrieve.
To get the app's own membership by using user
authentication,
you can optionally use spaces/{space}/members/app.
Format: spaces/{space}/members/{member} or spaces/{space}/members/app
You can use the user's email as an alias for {member}. For example,
spaces/{space}/members/example@gmail.com where example@gmail.com is the
email of the Google Chat user. Please see
ChatServiceClient::membershipName() for help formatting this field.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Google Apps Chat V1 Client - Class GetMembershipRequest (0.12.0)\n\nVersion latestkeyboard_arrow_down\n\n- [0.12.0 (latest)](/php/docs/reference/apps-chat/latest/Chat.V1.GetMembershipRequest)\n- [0.11.2](/php/docs/reference/apps-chat/0.11.2/Chat.V1.GetMembershipRequest)\n- [0.10.0](/php/docs/reference/apps-chat/0.10.0/Chat.V1.GetMembershipRequest)\n- [0.9.0](/php/docs/reference/apps-chat/0.9.0/Chat.V1.GetMembershipRequest)\n- [0.8.1](/php/docs/reference/apps-chat/0.8.1/Chat.V1.GetMembershipRequest)\n- [0.7.2](/php/docs/reference/apps-chat/0.7.2/Chat.V1.GetMembershipRequest)\n- [0.6.1](/php/docs/reference/apps-chat/0.6.1/Chat.V1.GetMembershipRequest)\n- [0.5.0](/php/docs/reference/apps-chat/0.5.0/Chat.V1.GetMembershipRequest)\n- [0.4.0](/php/docs/reference/apps-chat/0.4.0/Chat.V1.GetMembershipRequest)\n- [0.3.0](/php/docs/reference/apps-chat/0.3.0/Chat.V1.GetMembershipRequest)\n- [0.2.0](/php/docs/reference/apps-chat/0.2.0/Chat.V1.GetMembershipRequest)\n- [0.1.4](/php/docs/reference/apps-chat/0.1.4/Chat.V1.GetMembershipRequest) \nReference documentation and code samples for the Google Apps Chat V1 Client class GetMembershipRequest.\n\nRequest to get a membership of a space.\n\nGenerated from protobuf message `google.chat.v1.GetMembershipRequest`\n\nNamespace\n---------\n\nGoogle \\\\ Apps \\\\ Chat \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getName\n\nRequired. Resource name of the membership to retrieve.\n\nTo get the app's own membership [by using user\nauthentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user),\nyou can optionally use `spaces/{space}/members/app`.\nFormat: `spaces/{space}/members/{member}` or `spaces/{space}/members/app`\nYou can use the user's email as an alias for `{member}`. For example,\n`spaces/{space}/members/example@gmail.com` where `example@gmail.com` is the\nemail of the Google Chat user.\n\n### setName\n\nRequired. Resource name of the membership to retrieve.\n\nTo get the app's own membership [by using user\nauthentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user),\nyou can optionally use `spaces/{space}/members/app`.\nFormat: `spaces/{space}/members/{member}` or `spaces/{space}/members/app`\nYou can use the user's email as an alias for `{member}`. For example,\n`spaces/{space}/members/example@gmail.com` where `example@gmail.com` is the\nemail of the Google Chat user.\n\n### getUseAdminAccess\n\nOptional. When `true`, the method runs using the user's Google Workspace\nadministrator privileges.\n\nThe calling user must be a Google Workspace administrator with the\n[manage chat and spaces conversations\nprivilege](https://support.google.com/a/answer/13369245).\nRequires the `chat.admin.memberships` or `chat.admin.memberships.readonly`\n[OAuth 2.0\nscopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes).\nGetting app memberships in a space isn't supported when using admin access.\n\n### setUseAdminAccess\n\nOptional. When `true`, the method runs using the user's Google Workspace\nadministrator privileges.\n\nThe calling user must be a Google Workspace administrator with the\n[manage chat and spaces conversations\nprivilege](https://support.google.com/a/answer/13369245).\nRequires the `chat.admin.memberships` or `chat.admin.memberships.readonly`\n[OAuth 2.0\nscopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes).\nGetting app memberships in a space isn't supported when using admin access.\n\n### static::build"]]