# How to find the right social account id in the DunSocial CLI > Run dun accounts list, copy the id of the account you want, & pass it to --accounts. Filter with --platform. Never guess an id or use a handle. Connect new accounts in the DunSocial app first. Updated: 2026-10-05. ## Why ids, not handles A handle can be shared across platforms, renamed, or point at an account you haven't connected. DunSocial identifies each connected account by its own id, so every post command asks for that id. Using an id also means a post can't quietly go to the wrong account because two handles looked alike. ## List your accounts ```bash dun accounts list dun accounts list --json ``` Each row shows the `id`, the provider, the username & display name, whether it's connected & when its token expires. The id is the value you want. ## Filter by platform ```bash dun accounts list --platform x dun accounts list --platform linkedin --json ``` The platform names the CLI understands include `x` (or `twitter`), `linkedin`, `linkedin-business`, `bluesky`, `threads`, `reddit`, `pinterest`, `instagram`, `youtube`, `tiktok` & `facebook` (also `fb` or `facebook-page`). ## Use the id in a post ```bash dun posts schedule \ --text "Hello from DunSocial" \ --accounts ACCOUNT_ID \ --in 1h ``` Pass several ids as a comma-separated list to post to more than one account at once, such as `--accounts ACC1,ACC2`. ## If an account is missing Accounts are connected in the DunSocial web app, not from the CLI. Connect it there, then run `dun accounts list` again. Facebook Pages are in limited beta. Connect the Page in the app first, then list it with `dun accounts list --platform facebook`. ## A rule for agents & scripts Never invent or hard-code an id from memory. Fetch it at the start of a script or an agent run, because a disconnected & reconnected account can get a new id. DunSocial's CLI makes that cheap: `--json` output gives a script the id directly, & the same ids work in the API, SDK & MCP tools. ## Check the connection state The `isConnected` & `expiresAt` fields tell you whether a token needs attention. If an account shows as disconnected, reconnect it in the app before scheduling to it. DunSocial also sends a `social_account.reconnect_required` webhook event when an account needs reconnecting, which is useful if you want a script to be told rather than to poll. ## Related guides - [How to sign in to the DunSocial CLI](https://www.dunsocial.com/hub/dunsocial-cli-guides/how-to-sign-in-to-the-dunsocial-cli.md) - [How to schedule a post with the DunSocial CLI](https://www.dunsocial.com/hub/dunsocial-cli-guides/how-to-schedule-a-post-with-the-dunsocial-cli.md) - [How to post to Reddit from the command line](https://www.dunsocial.com/hub/dunsocial-cli-guides/how-to-post-to-reddit-from-the-command-line.md) - [How to manage multiple social media accounts](https://www.dunsocial.com/hub/social-media-management/how-to-manage-multiple-social-media-accounts.md) ## About this document This is the Markdown representation of https://www.dunsocial.com/hub/dunsocial-cli-guides/how-to-find-the-right-social-account-id-in-the-dunsocial-cli. The HTML version of the same page is at the same URL. You can also request Markdown from any page by sending `Accept: text/markdown`. Machine-readable summary of the whole site: https://www.dunsocial.com/llms.txt ## Company - Product: DunSocial, https://www.dunsocial.com - Legal entity: THISUX PRIVATE LIMITED, Chennai, Tamil Nadu, India - Support: support@dunsocial.com - Open the app: https://app.dunsocial.com/login