LinkedIn connector
OAuth 2.0CRM & SalesMarketingCommunicationConnect to LinkedIn to manage posts, ads, organizations, analytics, and professional profiles from your AI workflows.
LinkedIn connector
-
Install the SDK
Section titled “Install the SDK”Terminal window npm install @scalekit-sdk/nodeTerminal window pip install scalekit -
Set your credentials
Section titled “Set your credentials”Add your Scalekit credentials to your
.envfile. Find values in app.scalekit.com > Developers > API Credentials..env SCALEKIT_ENVIRONMENT_URL=<your-environment-url>SCALEKIT_CLIENT_ID=<your-client-id>SCALEKIT_CLIENT_SECRET=<your-client-secret> -
Authorize and make your first call
Section titled “Authorize and make your first call”quickstart.ts import { ScalekitClient } from '@scalekit-sdk/node'import 'dotenv/config'const scalekit = new ScalekitClient(process.env.SCALEKIT_ENV_URL,process.env.SCALEKIT_CLIENT_ID,process.env.SCALEKIT_CLIENT_SECRET,)const actions = scalekit.actionsconst connector = 'linkedin'const identifier = 'user_123'// Generate an authorization link for the userconst { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })console.log('Authorize LinkedIn:', link)process.stdout.write('Press Enter after authorizing...')await new Promise(r => process.stdin.once('data', r))// Make your first callconst result = await actions.executeTool({connector,identifier,toolName: 'linkedin_ad_accounts_search',toolInput: {},})console.log(result)quickstart.py import osfrom scalekit.client import ScalekitClientfrom dotenv import load_dotenvload_dotenv()scalekit_client = ScalekitClient(env_url=os.getenv("SCALEKIT_ENV_URL"),client_id=os.getenv("SCALEKIT_CLIENT_ID"),client_secret=os.getenv("SCALEKIT_CLIENT_SECRET"),)actions = scalekit_client.actionsconnection_name = "linkedin"identifier = "user_123"# Generate an authorization link for the userlink_response = actions.get_authorization_link(connection_name=connection_name,identifier=identifier,)print("Authorize LinkedIn:", link_response.link)input("Press Enter after authorizing...")# Make your first callresult = actions.execute_tool(tool_input={},tool_name="linkedin_ad_accounts_search",connection_name=connection_name,identifier=identifier,)print(result)
What you can do
Section titled “What you can do”Connect this agent connector to let your agent:
- Create reaction, organization post, ad account — Create a reaction (like, praise, empathy, etc.) on a LinkedIn post or comment
- Like post — Like a LinkedIn post on behalf of a person or organization
- Delete post, campaign, comment — Delete a UGC post from LinkedIn by its ID
- Update ad account, creative, campaign group — Partially update a LinkedIn ad account’s name or status
- Search ad accounts, organization, member — Search LinkedIn ad accounts by status or name
- List posts, post comments, campaign groups — List posts by a specific author (person or organization URN)
Tool list
Section titled “Tool list”Use the exact tool names from the Tool list below when you call execute_tool. If you’re not sure which name to use, list the tools available for the current user first.
linkedin_ad_account_create#Create a new LinkedIn ad account for running advertising campaigns.3 params
Create a new LinkedIn ad account for running advertising campaigns.
currencystringrequiredThe currency code for the ad account (e.g. 'USD', 'EUR').namestringrequiredThe name of the new ad account.referencestringrequiredReference URN for the account owner (e.g. organization URN 'urn:li:organization:12345').linkedin_ad_account_get#Get a LinkedIn ad account by its ID.1 param
Get a LinkedIn ad account by its ID.
account_idstringrequiredThe ID of the ad account to retrieve.linkedin_ad_account_update#Partially update a LinkedIn ad account's name or status.3 params
Partially update a LinkedIn ad account's name or status.
account_idstringrequiredThe ID of the ad account to update.namestringoptionalNew name for the ad account.statusstringoptionalNew status for the ad account (e.g. ACTIVE, CANCELED).linkedin_ad_account_users_list#List all users who have access to a LinkedIn ad account.1 param
List all users who have access to a LinkedIn ad account.
account_idstringrequiredThe ID of the ad account to list users for.linkedin_ad_accounts_search#Search LinkedIn ad accounts by status or name.2 params
Search LinkedIn ad accounts by status or name.
namestringoptionalFilter by account name (partial match).statusstringoptionalFilter by account status. One of: ACTIVE, CANCELED, DRAFT.linkedin_ad_analytics_get#Get analytics data for a LinkedIn ad campaign including impressions, clicks, and spend. Requires r_ads_reporting scope and Marketing Developer Platform access.5 params
Get analytics data for a LinkedIn ad campaign including impressions, clicks, and spend. Requires r_ads_reporting scope and Marketing Developer Platform access.
date_range_endstringrequiredEnd date for the analytics period in YYYY-MM-DD format.date_range_startstringrequiredStart date for the analytics period in YYYY-MM-DD format.pivotstringrequiredDimension to pivot analytics by. One of: CREATIVE, CAMPAIGN, CAMPAIGN_GROUP, ACCOUNT, MEMBER_COMPANY, MEMBER_COUNTRY_V2, MEMBER_REGION_V2, MEMBER_JOB_TITLE.time_granularitystringrequiredTime granularity for grouping analytics data. One of: DAILY, MONTHLY, ALL.campaignsstringoptionalCampaign URN to filter analytics (e.g. 'urn:li:sponsoredCampaign:712345678'). Provide this or account_id.linkedin_asset_get#Get the status and details of a LinkedIn image upload by its image URN.1 param
Get the status and details of a LinkedIn image upload by its image URN.
asset_idstringrequiredThe image URN returned from the initializeUpload response (e.g. urn:li:image:C4E22AQGadflBbEegg).linkedin_campaign_create#Create a new ad campaign within a LinkedIn ad account.11 params
Create a new ad campaign within a LinkedIn ad account.
account_idstringrequiredThe ID of the ad account to create the campaign in.campaign_group_idstringrequiredThe ID of the campaign group this campaign belongs to.cost_typestringrequiredThe cost type for the campaign (e.g. 'CPM', 'CPC', 'CPV').daily_budget_amountstringrequiredThe daily budget amount as a decimal string (e.g. '100.00').daily_budget_currencystringrequiredThe currency code for the daily budget (e.g. 'USD', 'EUR').namestringrequiredThe name of the campaign.objective_typestringrequiredThe objective type for the campaign (e.g. 'AWARENESS', 'WEBSITE_VISIT', 'LEAD_GENERATION').campaign_typestringoptionalThe campaign type. One of: SPONSORED_UPDATES, TEXT_AD, SPONSORED_INMAILS, DYNAMIC. Defaults to TEXT_AD.locale_countrystringoptionalISO 3166-1 alpha-2 country code for the campaign locale (e.g. US). Defaults to US.locale_languagestringoptionalISO 639-1 language code for the campaign locale (e.g. en). Defaults to en.statusstringoptionalInitial campaign status. One of: ACTIVE, PAUSED, DRAFT. Defaults to DRAFT.linkedin_campaign_delete#Delete a DRAFT LinkedIn ad campaign. Only campaigns in DRAFT status can be deleted.2 params
Delete a DRAFT LinkedIn ad campaign. Only campaigns in DRAFT status can be deleted.
account_idstringrequiredThe ID of the ad account that owns the campaign.campaign_idstringrequiredThe ID of the DRAFT campaign to delete.linkedin_campaign_get#Get a specific ad campaign by ID within a LinkedIn ad account.2 params
Get a specific ad campaign by ID within a LinkedIn ad account.
account_idstringrequiredThe ID of the ad account that owns the campaign.campaign_idstringrequiredThe ID of the campaign to retrieve.linkedin_campaign_group_create#Create a new campaign group within a LinkedIn ad account.4 params
Create a new campaign group within a LinkedIn ad account.
account_idstringrequiredThe ID of the ad account to create the campaign group in.namestringrequiredThe name of the campaign group.start_timeintegeroptionalStart time for the campaign group as Unix epoch milliseconds. If omitted, the group starts immediately.statusstringoptionalStatus of the campaign group. One of: ACTIVE, ARCHIVED, CANCELED, DRAFT, PAUSED. Defaults to ACTIVE.linkedin_campaign_group_get#Get a specific campaign group by ID within a LinkedIn ad account.2 params
Get a specific campaign group by ID within a LinkedIn ad account.
account_idstringrequiredThe ID of the ad account that owns the campaign group.group_idstringrequiredThe ID of the campaign group to retrieve.linkedin_campaign_group_update#Partially update a LinkedIn campaign group's name or status.4 params
Partially update a LinkedIn campaign group's name or status.
account_idstringrequiredThe ID of the ad account that owns the campaign group.group_idstringrequiredThe ID of the campaign group to update.namestringoptionalNew name for the campaign group.statusstringoptionalNew status for the campaign group (e.g. ACTIVE, PAUSED, ARCHIVED).linkedin_campaign_groups_list#List campaign groups for a LinkedIn ad account.4 params
List campaign groups for a LinkedIn ad account.
account_idstringrequiredThe ID of the ad account to list campaign groups for.countintegeroptionalNumber of results to return per page.startintegeroptionalOffset for pagination.statusstringoptionalFilter by campaign group status (e.g. ACTIVE, PAUSED, ARCHIVED).linkedin_campaign_update#Partially update a LinkedIn ad campaign's name or status.4 params
Partially update a LinkedIn ad campaign's name or status.
account_idstringrequiredThe ID of the ad account that owns the campaign.campaign_idstringrequiredThe ID of the campaign to update.namestringoptionalNew name for the campaign.statusstringoptionalNew status for the campaign (e.g. ACTIVE, PAUSED, ARCHIVED, CANCELED).linkedin_campaigns_list#List ad campaigns for a LinkedIn ad account.4 params
List ad campaigns for a LinkedIn ad account.
account_idstringrequiredThe ID of the ad account to list campaigns for.countintegeroptionalNumber of results to return per page.startintegeroptionalOffset for pagination.statusstringoptionalFilter by campaign status (e.g. ACTIVE, PAUSED, ARCHIVED, CANCELED, DRAFT).linkedin_comment_delete#Delete a specific comment on a LinkedIn post.3 params
Delete a specific comment on a LinkedIn post.
actor_urnstringrequiredThe URN of the actor (person) deleting the comment.comment_idstringrequiredThe numeric ID of the comment to delete.entity_urnstringrequiredURL-encoded URN of the parent post. Example: urn%3Ali%3AugcPost%3A7123456789.linkedin_comment_get#Get a specific comment on a LinkedIn post by entity URN and comment ID.2 params
Get a specific comment on a LinkedIn post by entity URN and comment ID.
comment_idstringrequiredThe numeric ID of the comment to retrieve.entity_urnstringrequiredURL-encoded URN of the parent post. Example: urn%3Ali%3AugcPost%3A7123456789.linkedin_creative_create#Create a new ad creative for a LinkedIn ad campaign.4 params
Create a new ad creative for a LinkedIn ad campaign.
account_idstringrequiredThe ID of the ad account to create the creative in.campaign_idstringrequiredThe numeric ID of the campaign this creative belongs to.namestringrequiredThe name of the creative.statusstringoptionalStatus of the creative. Defaults to ACTIVE.linkedin_creative_get#Get a specific ad creative by ID within a LinkedIn ad account.2 params
Get a specific ad creative by ID within a LinkedIn ad account.
account_idstringrequiredThe ID of the ad account that owns the creative.creative_idstringrequiredThe ID of the creative to retrieve.linkedin_creative_update#Partially update a LinkedIn ad creative's name or status.4 params
Partially update a LinkedIn ad creative's name or status.
account_idstringrequiredThe ID of the ad account that owns the creative.creative_idstringrequiredThe ID of the creative to update.namestringoptionalNew name for the creative.statusstringoptionalNew status for the creative (e.g. ACTIVE, PAUSED, ARCHIVED).linkedin_creatives_list#List ad creatives for a LinkedIn ad account, with optional filtering by campaign or status.5 params
List ad creatives for a LinkedIn ad account, with optional filtering by campaign or status.
account_idstringrequiredThe ID of the ad account to list creatives for.campaign_idstringoptionalFilter creatives by campaign URN.countintegeroptionalNumber of results to return per page.startintegeroptionalOffset for pagination.statusstringoptionalFilter by creative status (e.g. ACTIVE, PAUSED, ARCHIVED).linkedin_email_get#Retrieve the authenticated user's email address via the OpenID Connect userinfo endpoint. Requires openid and email scopes.0 params
Retrieve the authenticated user's email address via the OpenID Connect userinfo endpoint. Requires openid and email scopes.
linkedin_job_posting_get#Check the status of a LinkedIn job posting submitted via the Apply Connect API. Requires LinkedIn Apply Connect partner program access.1 param
Check the status of a LinkedIn job posting submitted via the Apply Connect API. Requires LinkedIn Apply Connect partner program access.
job_idstringrequiredYour external job ID as submitted to LinkedIn via the Apply Connect API.linkedin_media_upload_register#Initialize an image upload with LinkedIn (step 1 of image upload). Returns an uploadUrl to PUT the image bytes to. Requires w_member_social or w_organization_social scope.1 param
Initialize an image upload with LinkedIn (step 1 of image upload). Returns an uploadUrl to PUT the image bytes to. Requires w_member_social or w_organization_social scope.
owner_urnstringrequiredURN of the person or organization that owns the image (e.g. urn:li:person:{id} or urn:li:organization:{id}).linkedin_member_search#Search members who follow a specific organization by keyword (typeahead). Requires Community Management API enrollment and r_organization_followers scope.3 params
Search members who follow a specific organization by keyword (typeahead). Requires Community Management API enrollment and r_organization_followers scope.
keywordsstringrequiredKeywords to search for members.organization_urnstringrequiredURN of the organization whose followers to search within.countintegeroptionalNumber of results to return.linkedin_message_create#Send a direct message to a first-degree LinkedIn connection. Requires LinkedIn Messaging API partner access — usage is restricted to approved partners per LinkedIn's API agreement.3 params
Send a direct message to a first-degree LinkedIn connection. Requires LinkedIn Messaging API partner access — usage is restricted to approved partners per LinkedIn's API agreement.
bodystringrequiredThe text content of the message.recipientsstringrequiredComma-separated list of recipient person URNs. Recipients must be first-degree connections of the authenticated member.subjectstringoptionalOptional subject line for the message.linkedin_organization_access_control_list#List organizations where the authenticated user has admin access via the Organizational Entity ACLs API.1 param
List organizations where the authenticated user has admin access via the Organizational Entity ACLs API.
role_assignee_urnstringrequiredURN of the person whose org access to check, e.g. urn:li:person:{id}.linkedin_organization_admins_get#List administrators of a LinkedIn organization page using the Organizational Entity ACLs API.1 param
List administrators of a LinkedIn organization page using the Organizational Entity ACLs API.
idstringrequiredNumeric LinkedIn organization ID.linkedin_organization_by_vanity_get#Find a LinkedIn organization by its vanity name (the custom URL slug used in the company's LinkedIn URL).1 param
Find a LinkedIn organization by its vanity name (the custom URL slug used in the company's LinkedIn URL).
vanity_namestringrequiredThe vanity name (URL slug) of the organization to look up.linkedin_organization_followers_count#Get the follower count for a LinkedIn organization using its URL-encoded URN.1 param
Get the follower count for a LinkedIn organization using its URL-encoded URN.
organization_urnstringrequiredURL-encoded URN of the organization, e.g. urn%3Ali%3Aorganization%3A{id}.linkedin_organization_get#Retrieve details of a LinkedIn organization (company page) by its numeric ID.1 param
Retrieve details of a LinkedIn organization (company page) by its numeric ID.
idstringrequiredThe numeric ID of the LinkedIn organization.linkedin_organization_post_create#Create a UGC post on behalf of a LinkedIn organization. The post will appear on the organization's page.3 params
Create a UGC post on behalf of a LinkedIn organization. The post will appear on the organization's page.
organization_idstringrequiredThe numeric ID of the organization to post on behalf of.textstringrequiredThe text content of the post.visibilitystringoptionalVisibility of the post. PUBLIC or CONNECTIONS.linkedin_organization_search#Search LinkedIn organizations by keyword using the company search API.3 params
Search LinkedIn organizations by keyword using the company search API.
keywordsstringrequiredKeywords to search for organizations.countintegeroptionalNumber of results to return.startintegeroptionalOffset for pagination.linkedin_organizations_batch_get#Batch get multiple LinkedIn organizations by their numeric IDs. Works without admin access.1 param
Batch get multiple LinkedIn organizations by their numeric IDs. Works without admin access.
idsstringrequiredComma-separated list of organization IDs to retrieve (e.g. '12345,67890').linkedin_post_comment_create#Add a comment to a LinkedIn UGC post on behalf of a member.3 params
Add a comment to a LinkedIn UGC post on behalf of a member.
actorstringrequiredURN of the member leaving the comment, e.g. urn:li:person:{id}.textstringrequiredThe text content of the comment.ugc_post_urnstringrequiredURL-encoded URN of the UGC post to comment on, e.g. urn%3Ali%3AugcPost%3A{id}.linkedin_post_comments_list#List comments on a LinkedIn UGC post.3 params
List comments on a LinkedIn UGC post.
ugc_post_urnstringrequiredURL-encoded URN of the UGC post to retrieve comments for, e.g. urn%3Ali%3AugcPost%3A{id}.countintegeroptionalMaximum number of comments to return.startintegeroptionalPagination start index (0-based offset).linkedin_post_create#Create a UGC post on LinkedIn on behalf of the authenticated user or organization.3 params
Create a UGC post on LinkedIn on behalf of the authenticated user or organization.
authorstringrequiredURN of the post author, e.g. urn:li:person:{id} or urn:li:organization:{id}.textstringrequiredThe text content of the post.visibilitystringoptionalVisibility of the post. Options: PUBLIC, CONNECTIONS. Defaults to PUBLIC.linkedin_post_delete#Delete a UGC post from LinkedIn by its ID. This action is irreversible.1 param
Delete a UGC post from LinkedIn by its ID. This action is irreversible.
idstringrequiredURL-encoded post URN, e.g. urn%3Ali%3AugcPost%3A12345.linkedin_post_get#Get a specific LinkedIn post by its URL-encoded URN (e.g. urn%3Ali%3AugcPost%3A12345).1 param
Get a specific LinkedIn post by its URL-encoded URN (e.g. urn%3Ali%3AugcPost%3A12345).
idstringrequiredURL-encoded post URN, e.g. urn%3Ali%3AugcPost%3A12345.linkedin_post_like#Like a LinkedIn post on behalf of a person or organization. Uses the Reactions API.2 params
Like a LinkedIn post on behalf of a person or organization. Uses the Reactions API.
actor_urnstringrequiredRaw (unencoded) URN of the person or organization liking the post, e.g. urn:li:person:abc123.entity_urnstringrequiredRaw (unencoded) URN of the post to like, e.g. urn:li:ugcPost:7123456789.linkedin_posts_list#List posts by a specific author (person or organization URN).3 params
List posts by a specific author (person or organization URN).
authorstringrequiredURL-encoded author URN, e.g. urn%3Ali%3Aperson%3A{id} or urn%3Ali%3Aorganization%3A{id}.countintegeroptionalMaximum number of results to return.startintegeroptionalPagination start index (0-based offset).linkedin_profile_get#Retrieve the authenticated user's LinkedIn profile (name, picture, locale) via the OpenID Connect userinfo endpoint. Requires openid and profile scopes.0 params
Retrieve the authenticated user's LinkedIn profile (name, picture, locale) via the OpenID Connect userinfo endpoint. Requires openid and profile scopes.
linkedin_reaction_create#Create a reaction (like, praise, empathy, etc.) on a LinkedIn post or comment.3 params
Create a reaction (like, praise, empathy, etc.) on a LinkedIn post or comment.
actor_urnstringrequiredThe URN of the person reacting (e.g. 'urn:li:person:abc123').entity_urnstringrequiredThe URN of the post or comment to react to.reaction_typestringrequiredThe type of reaction. One of: LIKE, PRAISE, EMPATHY, INTEREST, APPRECIATION, ENTERTAINMENT.linkedin_reaction_delete#Delete a reaction from a LinkedIn post or comment.2 params
Delete a reaction from a LinkedIn post or comment.
actor_urnstringrequiredThe URN of the person whose reaction is being deleted (e.g. 'urn:li:person:abc123').entity_urnstringrequiredThe URN of the post or comment the reaction was made on.linkedin_reactions_list#List all reactions on a LinkedIn post or entity.3 params
List all reactions on a LinkedIn post or entity.
entity_urnstringrequiredURL-encoded URN of the post or entity to list reactions for. Example: urn%3Ali%3AugcPost%3A7123456789.countintegeroptionalNumber of reactions to return per page.startintegeroptionalOffset for pagination.linkedin_social_metadata_get#Get engagement metadata (likes, comments, reaction counts) for a post or share by its URN.1 param
Get engagement metadata (likes, comments, reaction counts) for a post or share by its URN.
share_urnstringrequiredURL-encoded post/share URN, e.g. urn%3Ali%3AugcPost%3A12345.linkedin_userinfo_get#Get the authenticated user's OpenID Connect userinfo including id, name, email, and profile picture.0 params
Get the authenticated user's OpenID Connect userinfo including id, name, email, and profile picture.