LinkedIn connector
OAuth 2.0 crmsalesConnect to LinkedIn to manage user authentication, profile data, email, and professional identity via OAuth 2.0
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.
currency string required The currency code for the ad account (e.g. 'USD', 'EUR'). name string required The name of the new ad account. reference string required Reference 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_id string required The 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_id string required The ID of the ad account to update. name string optional New name for the ad account. status string optional New 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_id string required The 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.
name string optional Filter by account name (partial match). status string optional Filter by account status. One of: ACTIVE, CANCELED, DRAFT. linkedin_ad_analytics_get
#
Get campaign analytics data for a LinkedIn ad campaign including impressions, clicks, and spend. 4 params
Get campaign analytics data for a LinkedIn ad campaign including impressions, clicks, and spend.
campaigns string required The campaign URN to retrieve analytics for (e.g. 'urn:li:sponsoredCampaign:712345678'). date_range_end string required End date for the analytics period (YYYY-MM-DD format). date_range_start string required Start date for the analytics period (YYYY-MM-DD format). time_granularity string required Granularity of the analytics data. One of: DAILY, MONTHLY, ALL. linkedin_asset_get
#
Get the status and details of an uploaded LinkedIn media asset. 1 param
Get the status and details of an uploaded LinkedIn media asset.
asset_id string required The ID of the media asset to retrieve. linkedin_campaign_create
#
Create a new ad campaign within a LinkedIn ad account. 7 params
Create a new ad campaign within a LinkedIn ad account.
account_id string required The ID of the ad account to create the campaign in. campaign_group_id string required The ID of the campaign group this campaign belongs to. cost_type string required The cost type for the campaign (e.g. 'CPM', 'CPC', 'CPV'). daily_budget_amount string required The daily budget amount as a decimal string (e.g. '100.00'). daily_budget_currency string required The currency code for the daily budget (e.g. 'USD', 'EUR'). name string required The name of the campaign. objective_type string required The objective type for the campaign (e.g. 'AWARENESS', 'WEBSITE_VISIT', 'LEAD_GENERATION'). 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_id string required The ID of the ad account that owns the campaign. campaign_id string required The 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_id string required The ID of the ad account that owns the campaign. campaign_id string required The ID of the campaign to retrieve. linkedin_campaign_group_create
#
Create a new campaign group within a LinkedIn ad account. 3 params
Create a new campaign group within a LinkedIn ad account.
account_id string required The ID of the ad account to create the campaign group in. name string required The name of the campaign group. status string optional Status 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_id string required The ID of the ad account that owns the campaign group. group_id string required The 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_id string required The ID of the ad account that owns the campaign group. group_id string required The ID of the campaign group to update. name string optional New name for the campaign group. status string optional New 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_id string required The ID of the ad account to list campaign groups for. count integer optional Number of results to return per page. start integer optional Offset for pagination. status string optional Filter 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_id string required The ID of the ad account that owns the campaign. campaign_id string required The ID of the campaign to update. name string optional New name for the campaign. status string optional New 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_id string required The ID of the ad account to list campaigns for. count integer optional Number of results to return per page. start integer optional Offset for pagination. status string optional Filter 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_urn string required The URN of the actor (person) deleting the comment. comment_id string required The ID of the comment to delete. entity_urn string required The URN of the post the comment belongs to. 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_id string required The ID of the comment to retrieve. entity_urn string required The URN of the post the comment belongs to. 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_id string required The ID of the ad account to create the creative in. campaign_id string required The campaign URN this creative belongs to (e.g. 'urn:li:sponsoredCampaign:712345678'). name string required The name of the creative. status string optional Status 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_id string required The ID of the ad account that owns the creative. creative_id string required The 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_id string required The ID of the ad account that owns the creative. creative_id string required The ID of the creative to update. name string optional New name for the creative. status string optional New 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_id string required The ID of the ad account to list creatives for. campaign_id string optional Filter creatives by campaign URN. count integer optional Number of results to return per page. start integer optional Offset for pagination. status string optional Filter by creative status (e.g. ACTIVE, PAUSED, ARCHIVED). linkedin_email_get
#
Retrieve the authenticated user's primary email address from LinkedIn. 0 params
Retrieve the authenticated user's primary email address from LinkedIn.
linkedin_job_posting_get
#
Get details of a specific LinkedIn job posting by its ID. 1 param
Get details of a specific LinkedIn job posting by its ID.
job_id string required The ID of the job posting to retrieve. linkedin_media_upload_register
#
Register a media asset upload with LinkedIn (step 1 of image/video upload). Returns an upload URL and asset ID to use for subsequent upload steps. 2 params
Register a media asset upload with LinkedIn (step 1 of image/video upload). Returns an upload URL and asset ID to use for subsequent upload steps.
owner_urn string required The URN of the person or organization that owns the media (e.g. 'urn:li:person:{id}'). recipe string required The media recipe type. One of: feedshare-image, feedshare-video, messaging-attachment. linkedin_member_search
#
Search LinkedIn members by keyword for at-mention typeahead (requires Marketing API access). 2 params
Search LinkedIn members by keyword for at-mention typeahead (requires Marketing API access).
keywords string required Keywords to search for members. count integer optional Number of results to return. linkedin_message_create
#
Send a LinkedIn message via the Messaging API (requires LinkedIn Messaging API partner access). Uses /rest/messages endpoint. 3 params
Send a LinkedIn message via the Messaging API (requires LinkedIn Messaging API partner access). Uses /rest/messages endpoint.
body string required The text content of the message. recipients string required Comma-separated list of recipient person URNs (e.g. 'urn:li:person:abc123,urn:li:person:def456'). subject string optional Optional 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_urn string required URN 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.
id string required Numeric 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_name string required The 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_urn string required URL-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.
id string required The 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_id string required The numeric ID of the organization to post on behalf of. text string required The text content of the post. visibility string optional Visibility of the post. PUBLIC or CONNECTIONS. linkedin_organization_search
#
Search LinkedIn organizations by keyword using the company search API. 2 params
Search LinkedIn organizations by keyword using the company search API.
keywords string required Keywords to search for organizations. count integer optional Number of results to return. 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.
ids string required Comma-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.
actor string required URN of the member leaving the comment, e.g. urn:li:person:{id}. text string required The text content of the comment. ugc_post_urn string required URL-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_urn string required URL-encoded URN of the UGC post to retrieve comments for, e.g. urn%3Ali%3AugcPost%3A{id}. count integer optional Maximum number of comments to return. start integer optional Pagination 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.
author string required URN of the post author, e.g. urn:li:person:{id} or urn:li:organization:{id}. text string required The text content of the post. visibility string optional Visibility 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.
id string required URL-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).
id string required URL-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_urn string required URN of the person or org liking the post, e.g. urn:li:person:{id}. entity_urn string required URN of the post to like, e.g. urn:li:ugcPost:{id} or urn:li:share:{id}. 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).
author string required URL-encoded author URN, e.g. urn%3Ali%3Aperson%3A{id} or urn%3Ali%3Aorganization%3A{id}. count integer optional Maximum number of results to return. start integer optional Pagination start index (0-based offset). linkedin_profile_get
#
Retrieve the current authenticated user's LinkedIn profile including first name, last name, ID, and profile picture. 0 params
Retrieve the current authenticated user's LinkedIn profile including first name, last name, ID, and profile picture.
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_urn string required The URN of the person reacting (e.g. 'urn:li:person:abc123'). entity_urn string required The URN of the post or comment to react to. reaction_type string required The 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_urn string required The URN of the person whose reaction is being deleted (e.g. 'urn:li:person:abc123'). entity_urn string required The 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_urn string required The URN of the post or entity to list reactions for. count integer optional Number of reactions to return per page. start integer optional Offset 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_urn string required URL-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.