> 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 # CreateFollowedChannel # Package: accounts # Namespace: LoyaltySocialMedia # Method link: https://dev.wix.com/docs/api-reference/crm/loyalty-program/accounts/social-media/create-followed-channel.md ## Permission Scopes: Manage Loyalty: SCOPE.DC-LOYALTY.MANAGE-LOYALTY ## Introduction Creates an entity for the specified account ID when the account follows a social media channel. Members can only follow enabled channels. A Wix user has to enable channels in the dashboard. >**Note:** >This method requires [visitor or member authentication](https://dev.wix.com/docs/api-reference/articles/authentication/about-identities.md). --- ## REST API ### Schema ``` Method: createFollowedChannel Description: Creates an entity for the specified account GUID when the account follows a social media channel. Members can only follow enabled channels. A Wix user has to enable channels in the dashboard. >**Note:** >This method requires [visitor or member authentication](https://dev.wix.com/docs/api-reference/articles/authentication/about-identities.md). URL: https://www.wixapis.com/v1/followed-channels Method: POST # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: followedChannel, followedChannel.channel Method parameters: param name: followedChannel | type: FollowedChannel | required: true - name: channel | type: Type | description: Followed social media channel. | required: true - enum: - FACEBOOK: Facebook social media channel. - INSTAGRAM: Instagram social media channel. - LINKEDIN: LinkedIn social media channel. - X: X social media channel. - TIKTOK: TikTok social media channel. Return type: CreateFollowedChannelResponse - name: followedChannel | type: FollowedChannel | description: Followed social media channel details. - name: id | type: string | description: Followed social media channel GUID. - name: accountId | type: string | description: GUID of the account that has followed a social media channel. - name: channel | type: Type | description: Followed social media channel. - enum: - FACEBOOK: Facebook social media channel. - INSTAGRAM: Instagram social media channel. - LINKEDIN: LinkedIn social media channel. - X: X social media channel. - TIKTOK: TikTok social media channel. - name: createdDate | type: string | description: Date and time when an entity for following a social media channel was created. ``` ### Examples ### Create a record for the followed social media channel ```curl curl -X POST \ 'https://www.wixapis.com/loyalty-social-media/v1/followed-channels' \ -H 'Authorization: ' \ -H 'Content-Type: application/json' \ -d '{ "followedChannel": { "channel": "X" } }' ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.accounts.LoyaltySocialMedia.createFollowedChannel(followedChannel) Description: Creates an entity for the specified account GUID when the account follows a social media channel. Members can only follow enabled channels. A Wix user has to enable channels in the dashboard. >**Note:** >This method requires [visitor or member authentication](https://dev.wix.com/docs/api-reference/articles/authentication/about-identities.md). # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: followedChannel, followedChannel.channel Method parameters: param name: followedChannel | type: FollowedChannel | required: true - name: channel | type: Type | description: Followed social media channel. | required: true - enum: - FACEBOOK: Facebook social media channel. - INSTAGRAM: Instagram social media channel. - LINKEDIN: LinkedIn social media channel. - X: X social media channel. - TIKTOK: TikTok social media channel. Return type: PROMISE - name: _id | type: string | description: Followed social media channel GUID. - name: accountId | type: string | description: GUID of the account that has followed a social media channel. - name: channel | type: Type | description: Followed social media channel. - enum: - FACEBOOK: Facebook social media channel. - INSTAGRAM: Instagram social media channel. - LINKEDIN: LinkedIn social media channel. - X: X social media channel. - TIKTOK: TikTok social media channel. - name: _createdDate | type: Date | description: Date and time when an entity for following a social media channel was created. ``` ### Examples ### createFollowedChannel ```javascript import { socialMedia } from '@wix/loyalty'; async function createFollowedChannel(followedChannel) { const response = await socialMedia.createFollowedChannel(followedChannel); }; ``` ### createFollowedChannel (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 { socialMedia } from '@wix/loyalty'; // Import the auth strategy for the relevant access type // Import the relevant host module if needed const myWixClient = createClient ({ modules: { socialMedia }, // Include the auth strategy and host as relevant }); async function createFollowedChannel(followedChannel) { const response = await myWixClient.socialMedia.createFollowedChannel(followedChannel); }; ``` ---