> For the complete documentation index, see [llms.txt](/llms.txt).

# Sessions (CAIP-25)

A session is an authorized connection between your dapp and MetaMask that can span multiple blockchain ecosystems and chains, as defined in [CAIP-25](https://github.com/ChainAgnostic/CAIPs/blob/main/CAIPs/caip-25.md). When a user approves a connection, MetaMask creates a session including the approved [scopes](/metamask-connect/multichain/concepts/scopes/) and [accounts](/metamask-connect/multichain/concepts/accounts/).

MetaMask Connect Multichain provides the method [getSession](/metamask-connect/multichain/reference/methods/#getsession) to get information about the current session, and the method [disconnect](/metamask-connect/multichain/reference/methods/#disconnect) to end or update the session. For more information about the session lifecycle, see [CAIP-316](https://standards.chainagnostic.org/CAIPs/caip-316).

A session is persistent, meaning it survives across page reloads and new tabs.

A session includes `sessionScopes`, which contains the chains the user approved, each with its associated accounts. The following example extracts the approved Ethereum Mainnet and Solana Mainnet accounts from `sessionScopes`:

```
const session = await client.provider.getSession()

const ethAccounts = session.sessionScopes['eip155:1']?.accounts || []
const solAccounts = session.sessionScopes['solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp']?.accounts || []

```

note

MetaMask doesn't support session IDs.

## Next steps[​](#next-steps "Direct link to Next steps")

- [Scopes](/metamask-connect/multichain/concepts/scopes/): Understand CAIP-2 chain identifiers used in sessions.
- [Accounts](/metamask-connect/multichain/concepts/accounts/): Learn how CAIP-10 account IDs identify accounts across chains.
