*** id: f72c466c-b0d3-489f-a981-1126495b338a title: getMemberState slug: /node/reference/chat/client/get-member-state description: getMemberState method for the Client class. max-toc-depth: 3 ---------------- ### getMemberState * **getMemberState**(`params`): `Promise<\{ channels: Record \}>` Returns the states of a member in the specified channels. #### Parameters Object containing the parameters of the method. Channels for which to get the state. ID of the member for which to get the state. #### Returns `Promise<{ channels: Record }>` A promise that resolves to an object containing the states of the member in the specified channels. #### Example In this example, we fetch the state of the member `User1` in the channel `channel1` and print it to the console. ```js import { SignalWire } from "@signalwire/realtime-api"; const client = await SignalWire({ project: "ProjectID Here", token: "Token Here" }) const chatClient = client.chat; let usesId = 'User1'; // Assumes a member with this id already exists and has joined the channel. const s = await chatClient.getMemberState({ channels: "channel1", // or a list of channels like: ["channel1", "channel2"] memberId: usesId }); console.log(`The state of ${usesId} is: ${JSON.stringify(s.channels.channel1.state, null, 2)}`); ```