Help & Support

Account Managers

This guide explains how to delegate social activities to an Account Manager.

An Account Manager is an EVM address authorized to sign social operations on behalf of an Account.

This allows the Account owner to maintain control while delegating the execution of social operations to one or more Account Managers.

Security Considerations

An Account Manager can sign most Account operations, except for those that, for security reasons, require the Account owner's signature.

The Tiered Transaction Model described in the Transaction Lifecycle guide specifies that Social Operations will fall back to a signed execution mode if the operation specifics require it.

For example, free collects can be signless, while paid collects will require a user signature.

Updating Account Managers is considered a sensitive operation and thus always requires the Account owner's signature. For this reason, all mutations involving Account Managers are Restricted Operations.

Add Account Managers

1

Add Manager To Owned Account

You MUST be authenticated as Account Owner to make this request.

Use the addAccountManager action to add an Account Manager to the logged-in Account.

import { evmAddress } from "@lens-protocol/client";import { addAccountManager } from "@lens-protocol/client/actions";
const result = await addAccountManager(sessionClient, {  address: evmAddress("0x1234..."),});

2

Handle Result

Then, handle the result using the adapter for the library of your choice:

import { handleWith } from "@lens-protocol/client/viem";
// …
const result = await addAccountManager(sessionClient, {  address: evmAddress("0x1234..."),}).andThen(handleWith(walletClient));

See the Transaction Lifecycle guide for more information on how to determine the status of the transaction.

Remove Account managers

1

Remove Manager From Owned Account

You MUST be authenticated as Account Owner to make this request.

Use the removeAccountManager action to remove an Account Manager from the logged-in Account.

Remove Account Manager
import { evmAddress } from "@lens-protocol/client";import { removeAccountManager } from "@lens-protocol/client/actions";
const result = await removeAccountManager(sessionClient, {  manager: evmAddress("0x1234..."),});

2

Handle Result

Then, handle the result using the adapter for the library of your choice:

import { handleWith } from "@lens-protocol/client/viem";
// …
const result = await removeAccountManager(sessionClient, {  manager: evmAddress("0x1234..."),}).andThen(handleWith(walletClient));

See the Transaction Lifecycle guide for more information on how to determine the status of the transaction.

Update Account Manager Permissions

1

Update Manager Permissions

You MUST be authenticated as Account Owner to make this request.

Use the updateAccountManager action to update an Account Manager's permissions.

Example
import { evmAddress } from "@lens-protocol/client";import { updateAccountManager } from "@lens-protocol/client/actions";
const result = await updateAccountManager(sessionClient, {  manager: evmAddress("0x1234..."),  permissions: {    canExecuteTransactions: true,    canTransferTokens: false,    canTransferNative: false,    canSetMetadataUri: true,  },});

2

Handle Result

Then, handle the result using the adapter for the library of your choice:

import { handleWith } from "@lens-protocol/client/viem";
// …
const result = await updateAccountManager(sessionClient, {  manager: evmAddress("0x1234..."),  permissions: {    canExecuteTransactions: true,    canTransferTokens: false,    canTransferNative: false,    canSetMetadataUri: true,  },}).andThen(handleWith(walletClient));

See the Transaction Lifecycle guide for more information on how to determine the status of the transaction.

Signless Experience

By leveraging the Account Manager feature, you can enable a signless experience for social interactions through the Lens API.

You MUST be authenticated as Account Owner to make this request.

Use the enableSignless action to set up the Lens API as Account Manager for the logged-in Account.

import { enableSignless } from "@lens-protocol/client/actions";
const result = await enableSignless(sessionClient);
if (result.isErr()) {  return console.error(result.error);}
const session = result.value;

Then, submit and monitor the transaction as explained in the Transaction Lifecycle guide.

Use the removeSignless action to remove the Lens API as Account Manager for the logged-in Account.

import { removeSignless } from "@lens-protocol/client/actions";
const result = await removeSignless(sessionClient);
if (result.isErr()) {  return console.error(result.error);}
const session = result.value;

And submit and monitor the transaction as explained in the Transaction Lifecycle guide.

List Account Managers

Use the paginated fetchAccountManagers action to list the Account Managers for the logged-in Account.

You MUST be authenticated as Account Owner or Account Manager to make this request.

import { fetchAccountManagers } from "@lens-protocol/client/actions";
const result = await fetchAccountManagers(sessionClient);
if (result.isErr()) {  return console.error(result.error);}
// items: Array<AccountManager>const { items, pageInfo } = result.value;

See the Pagination guide for more information on how to handle paginated results.