> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wanhap.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Social Accounts

> Connect and manage your social media accounts in Wanhap.

## What are social accounts?

Social accounts are the connections between Wanhap and your social media profiles or pages. When you connect an account, Wanhap gets permission to create and publish posts on your behalf.

## Supported platforms

| Platform                          | Identifier           | Account types                                         | Auth method          |
| --------------------------------- | -------------------- | ----------------------------------------------------- | -------------------- |
| **LinkedIn**                      | `linkedin`           | Personal profiles                                     | OAuth                |
| **LinkedIn Page**                 | `linkedin-page`      | Company pages                                         | OAuth                |
| **X (Twitter)**                   | `x`                  | Personal accounts                                     | OAuth                |
| **Facebook**                      | `facebook`           | Pages                                                 | OAuth                |
| **Instagram (Standalone)**        | `instagram`          | Personal IG via Instagram's own OAuth                 | OAuth                |
| **Instagram (Facebook Business)** | `instagram-facebook` | Business / creator accounts linked to a Facebook page | OAuth (via Facebook) |
| **TikTok**                        | `tiktok`             | Personal and business accounts                        | OAuth                |
| **YouTube**                       | `youtube`            | Channels                                              | OAuth (via Google)   |
| **Threads**                       | `threads`            | Personal accounts                                     | OAuth                |
| **Pinterest**                     | `pinterest`          | Personal and business accounts                        | OAuth                |
| **Bluesky**                       | `bluesky`            | Personal accounts                                     | App Password         |
| **Mastodon**                      | `mastodon`           | Any instance                                          | OAuth (per instance) |
| **Telegram**                      | `telegram`           | Channels and groups                                   | Bot (added as admin) |
| **Discord**                       | `discord`            | Servers (channel chosen per post)                     | Bot + OAuth          |

## Connecting an account

Go to **Accounts** in the dashboard and click the platform you want to connect. For most platforms, you'll be redirected to their authorization page. A few have extra steps:

* **LinkedIn Page** — after authorizing, pick which company page to connect
* **Facebook** — after authorizing, pick which page to manage
* **Instagram (Standalone)** — uses Instagram's own OAuth flow; suitable for personal IG accounts
* **Instagram (Facebook Business)** — authorize through Facebook, then pick the Instagram account linked to a Facebook page (required for first-party publishing of feed/reels/stories/carousels)
* **YouTube** — authorize with Google, then pick the channel
* **Bluesky** — enter your handle and an [App Password](https://bsky.app/settings/app-passwords) (not your main password)
* **Mastodon** — enter your instance URL first, then authorize on that instance
* **Telegram** — add the Wanhap bot as an admin to your channel or group, then post the `/connect` command shown in the dialog
* **Discord** — authorize Wanhap and choose which server to add the bot to (requires *Manage Server*); the whole server connects as one account and you pick the channel on each post

## Connection limits (Cloud only)

On Wanhap Cloud, each workspace connects up to 3 accounts per network. To connect more accounts on the same network, add another workspace.

## Active vs. inactive

Each social account can be toggled between **active** and **inactive**:

* **Active** — The account is included when creating new posts. New posts will have a platform entry for this account.
* **Inactive** — The account is excluded from new posts. Existing scheduled posts are not affected.

Toggle an account's active state from the **Accounts** page or via the API.

<Tip>
  Use inactive mode when you want to temporarily pause posting to a specific account (e.g., during a holiday) without disconnecting it.
</Tip>

## Connection status

| Status            | Description                                    | Action needed         |
| ----------------- | ---------------------------------------------- | --------------------- |
| **Connected**     | Working correctly, Wanhap can publish posts    | None                  |
| **Disconnected**  | Authorization was revoked or token expired     | Reconnect the account |
| **Token expired** | Access token expired and couldn't be refreshed | Reconnect the account |

Wanhap runs background checks to keep social connections healthy:

* **Every 15 minutes** — proactively refreshes OAuth tokens that are about to expire, before the platform forces them out
* **Daily** — verifies every connected account still authenticates correctly
* **Every 30 minutes** — sweeps posts left stuck mid-publish and either retries or marks them failed

If any of these detects a disconnected or expired account, the workspace owner receives a notification (in-app and email).

### Why accounts get disconnected

* **Token expiration** — Some platforms issue short-lived tokens. Wanhap automatically refreshes them, but if the refresh fails (e.g., the refresh token also expired), the account disconnects.
* **Password change** — Changing your password on the platform may revoke all OAuth tokens.
* **Permission revoked** — You manually revoked Wanhap's access in the platform's settings.
* **Platform policy** — The platform may revoke tokens for inactivity or policy changes.

## Token security

* Access tokens and refresh tokens are **encrypted at rest** using Laravel's encryption
* Tokens are **never exposed** in API responses — the `access_token` and `refresh_token` fields are hidden
* Each account stores its token expiry date and Wanhap proactively refreshes tokens before they expire

## Disconnecting an account

Go to **Accounts**, find the account, and click **Disconnect**. This:

* Removes the connection from Wanhap
* Does not affect existing published posts
* Does not revoke Wanhap's access on the platform (you can do that in the platform's settings)

## FAQ

<AccordionGroup>
  <Accordion title="Can I connect the same account twice?">
    No. Each social media account can only be connected once per workspace. If you try to connect an account that's already connected, Wanhap will update the existing connection.
  </Accordion>

  <Accordion title="What happens to scheduled posts if an account disconnects?">
    Posts scheduled for a disconnected account will fail for that platform when the scheduled time arrives. Other platforms in the same post are not affected. You'll receive a notification about the failure.
  </Accordion>

  <Accordion title="Do I need to reconnect accounts periodically?">
    Usually no. Wanhap automatically refreshes tokens. However, some platforms (like TikTok) have shorter token lifetimes and may occasionally require reconnection.
  </Accordion>

  <Accordion title="Can I connect accounts from different workspaces to the same social profile?">
    Yes. Each workspace manages its own connections independently. The same LinkedIn profile can be connected in multiple workspaces.
  </Accordion>
</AccordionGroup>
