> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

# ListAccounts

# Package: socialMedia

# Namespace: AccountService

# Method link: https://dev.wix.com/docs/api-reference/business-management/marketing/social-media/account-v1/list-accounts.md

## Permission Scopes:
Manage Social Posts: SCOPE.PROMOTE.MANAGE-SOCIAL-POSTS

## Introduction

Retrieves the connected accounts for a social channel.

Specify the `channelName` to retrieve the accounts the site owner has connected for that channel.

---

## REST API

### Schema

```
 Method: listAccounts
 Description: Retrieves the connected accounts for a social channel.  Specify the `channelName` to retrieve the accounts the site owner has connected for that channel.
 URL: https://www.wixapis.com/social-publisher/v1/accounts
 Method: GET
 Method parameters:
   param name: channelName | type: ChannelName | description: Supported social channel.  
      - enum:
           INSTAGRAM - 
           FACEBOOK - 
           YOUTUBE - 
           LINKEDIN - 
           TWITTER - Deprecated: No longer functional as of July 1, 2026.
           PINTEREST - 
           GBP - Google Business Profile.
           TIKTOK - 
 Return type: ListAccountsResponse
  - name: accounts | type: array<Account> | description: Connected accounts for the channel.  
     - ONE-OF: 
        - name: instagram | type: InstagramAccount | description: Instagram account details.  
           - name: id | type: string | description: Account GUID.  
           - name: username | type: string | description: Account username.  
           - name: displayName | type: string | description: Display name of the account.  
           - name: profilePicUrl | type: string | description: URL of the account's profile picture.  
           - name: coupledFacebookPage | type: CoupledFacebookPage | description: Facebook page linked to this Instagram account.  
              - name: id | type: string | description: Facebook page GUID.  
              - name: displayName | type: string | description: Display name of the Facebook page.  
           - name: settings | type: InstagramSettings | description: Account settings.  
              - name: default | type: boolean | description: Whether this is the default account to publish to.  
        - name: facebook | type: FacebookAccount | description: Facebook account details.  
           - name: id | type: string | description: Account GUID.  
           - name: displayName | type: string | description: Display name of the account.  
           - name: page | type: FacebookPage | description: Facebook page the post is published to.  
              - name: id | type: string | description: Page GUID.  
              - name: displayName | type: string | description: Display name of the page.  
              - name: pictureUrl | type: string | description: URL of the page's picture.  
           - name: settings | type: FacebookSettings | description: Account settings.  
              - name: default | type: boolean | description: Whether this is the default page to publish to.  
        - name: youtube | type: YouTubeChannel | description: YouTube channel details.  
           - name: id | type: string | description: Channel GUID.  
           - name: displayName | type: string | description: Display name of the channel.  
           - name: pictureUrl | type: string | description: URL of the channel's picture.  
        - name: linkedin | type: LinkedinChannel | description: LinkedIn account details.  
           - name: id | type: string | description: Channel GUID.  
           - name: displayName | type: string | description: Display name of the channel.  
           - name: pictureUrl | type: string | description: URL of the channel's picture.  
           - name: settings | type: LinkedinSettings | description: Channel settings.  
              - name: default | type: boolean | description: Whether this is the default channel to publish to.  
        - name: pinterest | type: PinterestAccount | description: Pinterest account details.  
           - name: id | type: string | description: Account GUID.  | validation: maxLength 128
           - name: displayName | type: string | description: Display name of the account.  | validation: maxLength 2000
           - name: pictureUrl | type: string | description: URL of the account's picture.  | validation: format WEB_URL
           - name: board | type: PinterestBoard | description: Board the post is published to.  
              - name: id | type: string | description: Board GUID.  | validation: maxLength 128
              - name: displayName | type: string | description: Display name of the board.  | validation: maxLength 2000
              - name: pictureUrl | type: string | description: URL of the board's picture.  | validation: format WEB_URL
              - name: privacy | type: PinterestBoardPrivacy | description: Privacy level of the board.  
                     - enum: PUBLIC, PROTECTED, SECRET
           - name: settings | type: PinterestSettings | description: Account settings.  
              - name: default | type: boolean | description: Whether this is the default board to publish to.  
        - name: gbp | type: GBPAccount | description: Google Business Profile account details.  
           - name: id | type: string | description: Account GUID.  | validation: maxLength 1024
           - name: displayName | type: string | description: Display name of the account.  | validation: maxLength 1024
           - name: location | type: GBPLocation | description: Location the post is published to.  
              - name: id | type: string | description: Location GUID.  | validation: maxLength 1024
              - name: displayName | type: string | description: Display name of the location.  | validation: maxLength 1024
              - name: pictureUrl | type: string | description: URL of the location's picture.  | validation: format WEB_URL
              - name: address | type: PostalAddress | description: Postal address of the location.  
                 - name: revision | type: integer | description: The schema revision of the PostalAddress  | validation: format int32
                 - name: regionCode | type: string | description: CLDR region code of the country/region of the address  | validation: maxLength 1024
                 - name: languageCode | type: string | description: BCP-47 language code of the contents of this address (if known)  | validation: maxLength 1024
                 - name: postalCode | type: string | description: Postal code of the address  | validation: maxLength 1024
                 - name: sortingCode | type: string | description: Additional, country-specific, sorting code  | validation: maxLength 1024
                 - name: administrativeArea | type: string | description: Highest administrative subdivision which is used for postal addresses of a country or region  | validation: maxLength 1024
                 - name: locality | type: string | description: Generally refers to the city/town portion of the address  | validation: maxLength 1024
                 - name: sublocality | type: string | description: Sublocality of the address  | validation: maxLength 1024
                 - name: addressLines | type: array<string> | description: Unstructured address lines describing the lower levels of an address  | validation: maxItems 20, maxLength 1024
                 - name: recipients | type: array<string> | description: The recipient at the address  | validation: maxItems 20, maxLength 1024
                 - name: organization | type: string | description: The name of the organization at the address  | validation: maxLength 1024
           - name: settings | type: GBPSettings | description: Account settings.  
              - name: default | type: boolean | description: Whether this is the default location to publish to.  
        - name: tiktok | type: TikTokAccount | description: TikTok account details.  
           - name: id | type: string | description: Account GUID.  | validation: maxLength 128
           - name: displayName | type: string | description: Display name of the account.  | validation: maxLength 128
           - name: pictureUrl | type: string | description: URL of the account's picture.  | validation: format WEB_URL
           - name: privacyLevelOptions | type: array<TikTokPrivacyLevel> | description: Privacy levels the account allows for a post.  | validation: maxItems 3
                 - enum: PUBLIC_TO_EVERYONE, FOLLOWER_OF_CREATOR, MUTUAL_FOLLOW_FRIENDS, SELF_ONLY
           - name: commentDisabled | type: boolean | description: Whether comments are disabled for the account.  
           - name: duetDisabled | type: boolean | description: Whether duets are disabled for the account.  
           - name: stitchDisabled | type: boolean | description: Whether stitches are disabled for the account.  
           - name: maxVideoPostDurationSeconds | type: integer | description: Maximum allowed video post duration, in seconds.  | validation: format int32
     - name: channelName | type: ChannelName | description: Social channel the account belongs to.  
         - enum: INSTAGRAM, FACEBOOK, YOUTUBE, LINKEDIN, TWITTER, PINTEREST, GBP, TIKTOK

 Possible Errors:
   HTTP Code: 428 | Status Code: FAILED_PRECONDITION | Application Code: NO_PAGES_FOR_USER | Description: The connected Facebook user has no pages, so no accounts can be retrieved.


```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.promoteGrowthToolsPublisher.accounts.listAccounts(options)
 Description: Retrieves the connected accounts for a social channel.  Specify the `channelName` to retrieve the accounts the site owner has connected for that channel.
 Method parameters:
   param name: options | type: ListAccountsOptions  none  
        - name: channelName | type: ChannelName | description: Social channel to retrieve connected accounts for.  
             - enum: INSTAGRAM, FACEBOOK, YOUTUBE, LINKEDIN, TWITTER, PINTEREST, GBP, TIKTOK
 Return type: PROMISE<ListAccountsResponse>
  - name: accounts | type: array<Account> | description: Connected accounts for the channel.  
     - ONE-OF: 
        - name: instagram | type: InstagramAccount | description: Instagram account details.  
           - name: _id | type: string | description: Account GUID.  
           - name: username | type: string | description: Account username.  
           - name: displayName | type: string | description: Display name of the account.  
           - name: profilePicUrl | type: string | description: URL of the account's profile picture.  
           - name: coupledFacebookPage | type: CoupledFacebookPage | description: Facebook page linked to this Instagram account.  
              - name: _id | type: string | description: Facebook page GUID.  
              - name: displayName | type: string | description: Display name of the Facebook page.  
           - name: settings | type: InstagramSettings | description: Account settings.  
              - name: default | type: boolean | description: Whether this is the default account to publish to.  
        - name: facebook | type: FacebookAccount | description: Facebook account details.  
           - name: _id | type: string | description: Account GUID.  
           - name: displayName | type: string | description: Display name of the account.  
           - name: page | type: FacebookPage | description: Facebook page the post is published to.  
              - name: _id | type: string | description: Page GUID.  
              - name: displayName | type: string | description: Display name of the page.  
              - name: pictureUrl | type: string | description: URL of the page's picture.  
           - name: settings | type: FacebookSettings | description: Account settings.  
              - name: default | type: boolean | description: Whether this is the default page to publish to.  
        - name: youtube | type: YouTubeChannel | description: YouTube channel details.  
           - name: _id | type: string | description: Channel GUID.  
           - name: displayName | type: string | description: Display name of the channel.  
           - name: pictureUrl | type: string | description: URL of the channel's picture.  
        - name: linkedin | type: LinkedinChannel | description: LinkedIn account details.  
           - name: _id | type: string | description: Channel GUID.  
           - name: displayName | type: string | description: Display name of the channel.  
           - name: pictureUrl | type: string | description: URL of the channel's picture.  
           - name: settings | type: LinkedinSettings | description: Channel settings.  
              - name: default | type: boolean | description: Whether this is the default channel to publish to.  
        - name: pinterest | type: PinterestAccount | description: Pinterest account details.  
           - name: _id | type: string | description: Account GUID.  | validation: maxLength 128
           - name: displayName | type: string | description: Display name of the account.  | validation: maxLength 2000
           - name: pictureUrl | type: string | description: URL of the account's picture.  | validation: format WEB_URL
           - name: board | type: PinterestBoard | description: Board the post is published to.  
              - name: _id | type: string | description: Board GUID.  | validation: maxLength 128
              - name: displayName | type: string | description: Display name of the board.  | validation: maxLength 2000
              - name: pictureUrl | type: string | description: URL of the board's picture.  | validation: format WEB_URL
              - name: privacy | type: PinterestBoardPrivacy | description: Privacy level of the board.  
                     - enum: PUBLIC, PROTECTED, SECRET
           - name: settings | type: PinterestSettings | description: Account settings.  
              - name: default | type: boolean | description: Whether this is the default board to publish to.  
        - name: gbp | type: GBPAccount | description: Google Business Profile account details.  
           - name: _id | type: string | description: Account GUID.  | validation: maxLength 1024
           - name: displayName | type: string | description: Display name of the account.  | validation: maxLength 1024
           - name: location | type: GBPLocation | description: Location the post is published to.  
              - name: _id | type: string | description: Location GUID.  | validation: maxLength 1024
              - name: displayName | type: string | description: Display name of the location.  | validation: maxLength 1024
              - name: pictureUrl | type: string | description: URL of the location's picture.  | validation: format WEB_URL
              - name: address | type: PostalAddress | description: Postal address of the location.  
                 - name: revision | type: integer | description: The schema revision of the PostalAddress  | validation: format int32
                 - name: regionCode | type: string | description: CLDR region code of the country/region of the address  | validation: maxLength 1024
                 - name: languageCode | type: string | description: BCP-47 language code of the contents of this address (if known)  | validation: maxLength 1024
                 - name: postalCode | type: string | description: Postal code of the address  | validation: maxLength 1024
                 - name: sortingCode | type: string | description: Additional, country-specific, sorting code  | validation: maxLength 1024
                 - name: administrativeArea | type: string | description: Highest administrative subdivision which is used for postal addresses of a country or region  | validation: maxLength 1024
                 - name: locality | type: string | description: Generally refers to the city/town portion of the address  | validation: maxLength 1024
                 - name: sublocality | type: string | description: Sublocality of the address  | validation: maxLength 1024
                 - name: addressLines | type: array<string> | description: Unstructured address lines describing the lower levels of an address  | validation: maxItems 20, maxLength 1024
                 - name: recipients | type: array<string> | description: The recipient at the address  | validation: maxItems 20, maxLength 1024
                 - name: organization | type: string | description: The name of the organization at the address  | validation: maxLength 1024
           - name: settings | type: GBPSettings | description: Account settings.  
              - name: default | type: boolean | description: Whether this is the default location to publish to.  
        - name: tiktok | type: TikTokAccount | description: TikTok account details.  
           - name: _id | type: string | description: Account GUID.  | validation: maxLength 128
           - name: displayName | type: string | description: Display name of the account.  | validation: maxLength 128
           - name: pictureUrl | type: string | description: URL of the account's picture.  | validation: format WEB_URL
           - name: privacyLevelOptions | type: array<TikTokPrivacyLevel> | description: Privacy levels the account allows for a post.  | validation: maxItems 3
                 - enum: PUBLIC_TO_EVERYONE, FOLLOWER_OF_CREATOR, MUTUAL_FOLLOW_FRIENDS, SELF_ONLY
           - name: commentDisabled | type: boolean | description: Whether comments are disabled for the account.  
           - name: duetDisabled | type: boolean | description: Whether duets are disabled for the account.  
           - name: stitchDisabled | type: boolean | description: Whether stitches are disabled for the account.  
           - name: maxVideoPostDurationSeconds | type: integer | description: Maximum allowed video post duration, in seconds.  | validation: format int32
     - name: channelName | type: ChannelName | description: Social channel the account belongs to.  
         - enum: INSTAGRAM, FACEBOOK, YOUTUBE, LINKEDIN, TWITTER, PINTEREST, GBP, TIKTOK

 Possible Errors:
   HTTP Code: 428 | Status Code: FAILED_PRECONDITION | Application Code: NO_PAGES_FOR_USER | Description: The connected Facebook user has no pages, so no accounts can be retrieved.


```

### Examples

### listAccounts
```javascript
import { accounts } from '@wix/promote-growth-tools-publisher';

async function listAccounts(options) {
  const response = await accounts.listAccounts(options);
};
```

### listAccounts (with elevated permissions)
```javascript
import { accounts } from '@wix/promote-growth-tools-publisher';
import { auth } from '@wix/essentials';

async function myListAccountsMethod(options) {
  const elevatedListAccounts = auth.elevate(accounts.listAccounts);
  const response = await elevatedListAccounts(options);
}
```

### listAccounts (self-hosted)
Self-hosted SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md).

```javascript
import { createClient } from '@wix/sdk';
import { accounts } from '@wix/promote-growth-tools-publisher';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

const myWixClient = createClient ({
  modules: { accounts },
  // Include the auth strategy and host as relevant
});


async function listAccounts(options) {
  const response = await myWixClient.accounts.listAccounts(options);
};
```

---