async function createClientWithUserCredentials (scopes) {
  // For more information on user authentication, see
  // https://developers.google.com/workspace/chat/authenticate-authorize-chat-user
  return new ChatServiceClient({
    authClient: await getAuthenticatedUserOAuth2Client(scopes),
    scopes: scopes,
  });
}
Create a new Chat service client with user credentials and scopes.

@param {!string[]} scopes Required scopes for the desired API requests
@returns {Promise<ChatServiceClient>} The resulting client for the Chat service