Join Groups
This guide will help you manage Group membership on Lens.
Join a Group
- TypeScript
- GraphQL
- React
Use the joinGroup action to join a Group with the logged-in account.
You MUST be authenticated as Account Owner or Account Manager to make this request.
Example
import { evmAddress } from "@lens-protocol/client";import { joinGroup } from "@lens-protocol/client/actions";
const result = await joinGroup(sessionClient, { group: evmAddress("0x1234") });
- TypeScript
- GraphQL
- React
Finally, handle the result using the adapter for the library of your choice:
See the Transaction Lifecycle guide for more information on how to determine the status of the transaction.
Leave a Group
- TypeScript
- GraphQL
- React
Use the leaveGroup action to leave a Group with the logged-in account.
You MUST be authenticated as Account Owner or Account Manager to make this request.
Example
import { evmAddress } from "@lens-protocol/client";import { leaveGroup } from "@lens-protocol/client/actions";
const result = await leaveGroup(sessionClient, { group: evmAddress("0x1234") });
- TypeScript
- GraphQL
- React
Finally, handle the result using the adapter for the library of your choice:
See the Transaction Lifecycle guide for more information on how to determine the status of the transaction.