Skip to content

LinkedIn

LinkedIn

LinkedIn is the world’s largest professional networking platform, connecting professionals, companies, and thought leaders to create content, generate business opportunities, and advance careers. With the LinkedIn integration in SquadOS, your agents can publish posts and articles, engage with content, manage media, and access organizational page analytics directly through the API.

This tool uses OAuth 2.0 (OAUTH2) to connect.

Authentication is handled via OAuth flow in the browser — when you click Connect, you will be redirected to Composio’s secure page where you authorize access to your LinkedIn account. No manual credentials are required.

  1. Go to Tools in the side menu (/admin/tools).
  2. Open the Available tab and search for LinkedIn.
  3. Click the card to open the details modal and hit Connect.
  4. You’re taken to the secure connection page hosted by Composio, where you authorize access (OAuth).
  5. Once done, you’re sent back to SquadOS with the account connected and the tool available for your agents. (Connection-flow details in Organization Tools.)

How do I set up custom OAuth credentials for LinkedIn?

Section titled “How do I set up custom OAuth credentials for LinkedIn?”

For a step-by-step guide on creating and configuring your own LinkedIn OAuth credentials with Composio, see How to create OAuth credentials for LinkedIn.

Why am I getting 429 rate limit errors on LinkedIn?

Section titled “Why am I getting 429 rate limit errors on LinkedIn?”

The default OAuth app is shared across users and has strict rate limits. Use your own OAuth app for production to avoid shared quotas.

Why can’t I use certain LinkedIn scope combinations?

Section titled “Why can’t I use certain LinkedIn scope combinations?”

LinkedIn restricts certain scope combinations. For example, w_member_social and r_organization_admin cannot be used together. If you need conflicting scopes, create your own OAuth app with the required permissions.

LINKEDIN_CREATE_ARTICLE_OR_URL_SHARE

Tool to create an article or URL share on LinkedIn using the UGC Posts API. Use when you need to share a link with optional commentary on LinkedIn. Supports sharing URLs as articles with customizable visibility settings.

NameTypeRequiredDescription
authorstringYesURN of the author (person or organization). For a person: 'urn:li:person:{id}'. For an organization: 'urn:li:organization:{id}'. Use GET_MY_INFO action to get your person ID.
visibilityobjectYesVisibility settings for the post. Controls who can see the shared content.
lifecycleStatestring ("PUBLISHED" | "DRAFT")NoState of the post. Use 'PUBLISHED' to post immediately or 'DRAFT' to save as draft.
specificContentobjectYesContainer for the share content including URL, commentary, and media category.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

LINKEDIN_CREATE_COMMENT_ON_POST

Tool to create a first-level or nested comment on a LinkedIn share, UGC post, or parent comment via the Social Actions Comments API. Use when you need to engage with posts by adding comments or replying to existing comments. Supports text comments with optional @-mentions and image attachments.

NameTypeRequiredDescription
actorstringYesEntity which authored the comment. For personal comments: 'urn:li:person:{id}'. For organization comments: 'urn:li:organization:{id}'. Use the GET_USER_INFO action to retrieve the id field.
objectstringYesThe URN of the share or ugcPost that contains the comment. Typically the same as target_urn for first-level comments, or the root post URN for nested comments. Must be 'urn:li:share:{id}' or 'urn:li:ugcPost:{id}'. Activity URNs ('urn:li:activity:{id}') are NOT supported.
contentarrayNoArray of content entities such as images to include in the comment. Each entity should contain an image URN or other content type.
messageobjectYesThe comment message content including text and optional @-mentions.
target_urnstringYesThe URN of the share, UGC post, or parent comment where the comment will be created. Must be 'urn:li:share:{id}', 'urn:li:ugcPost:{id}', or 'urn:li:comment:({parentUrn},{commentId})'. Activity URNs are NOT supported.
parentCommentstringNoFor nested comments (replies), the URN of the parent comment being replied to. Format: 'urn:li:comment:({parentUrn},{commentId})'. Leave empty for first-level comments on the post.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

LINKEDIN_CREATE_LINKED_IN_POST

Creates a new post on LinkedIn for the authenticated user or an organization they manage. Requires w_member_social scope for posting as a person, and w_organization_social scope for posting as an organization (with ADMINISTRATOR, DIRECT_SPONSORED_CONTENT_POSTER, or CONTENT_ADMIN role).

NameTypeRequiredDescription
authorstringYesThe URN of the LinkedIn member or organization creating the post. For a person: 'urn:li:person:{id}' (e.g., 'urn:li:person:F6kGF1Uduq'). For an organization: 'urn:li:organization:{id}'. Get your person ID using GET_MY_INFO, or get organization IDs from GET_COMPANY_INFO.
imagesarrayNoArray of images to upload and attach to the post. Supports 1-20 images.
containerstringNoContainer entity URN for posting within a specific container (e.g., 'urn:li:group:123456' for group posts).
commentarystringYesThe main text content of the post. Supports plain text and @-mentions. Maximum length: 3000 characters.
visibilitystring ("PUBLIC" | "CONNECTIONS" | "LOGGED_IN" | "CONTAINER")NoControls who can see the post. 'PUBLIC' makes it visible to everyone, 'CONNECTIONS' to connections only, 'LOGGED_IN' to signed-in LinkedIn members, and 'CONTAINER' for specific group/event posts.
distributionobjectNoSpecifies distribution rules for the post, including feed distribution and targeting.
lifecycleStatestringNoThe state of the post. Use 'PUBLISHED' to post directly, 'DRAFT' to save as a draft, or 'PUBLISH_REQUESTED' if the post requires review before publishing.
reshareContextobjectNoContext for resharing another post.
contentLandingPagestringNoURL of the landing page that opens when the call-to-action button is clicked. Required when contentCallToActionLabel is specified.
contentCallToActionLabelstringNoCall-to-action button labels for posts. Values: "APPLY", "DOWNLOAD", "VIEW_QUOTE", "LEARN_MORE", "SIGN_UP", "SUBSCRIBE", "REGISTER", "JOIN", "ATTEND", "REQUEST_DEMO", "SEE_MORE", "BUY_NOW", "SHOP_NOW".
isReshareDisabledByAuthorbooleanNoSet to true to prevent others from resharing this post.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

LINKEDIN_DELETE_LINKED_IN_POST

Deletes a specific LinkedIn post (share) by its unique share_id, which must correspond to an existing share.

NameTypeRequiredDescription
share_idstringYesUnique identifier of the LinkedIn share (post) to be deleted. Accepts either numeric ID (e.g., '7245341016004718592') or URN format (e.g., 'urn:li:share:7245341016004718592').
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

LINKEDIN_DELETE_POST

Delete a LinkedIn post using the Posts API REST endpoint. Supports both ugcPost and share URN formats. The endpoint is idempotent - previously deleted posts return success (204).

NameTypeRequiredDescription
post_urnstringYesThe URN of the post to delete. Accepts either ugcPost or share URN formats (e.g., 'urn:li:ugcPost:7890123456' or 'urn:li:share:7245341016004718592'). The URN will be URL-encoded automatically.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

LINKEDIN_DELETE_UGC_POST

Delete a UGC post using the legacy UGC Post API endpoint. Use when you need to delete a post using the v2/ugcPosts endpoint. Deletion is idempotent - previously deleted posts also return success.

NameTypeRequiredDescription
ugc_post_urnstringYesThe URN of the UGC post or share to delete. Format: 'urn:li:ugcPost:{id}' or 'urn:li:share:{id}'. Will be URL-encoded automatically by the action.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

LINKEDIN_GET_AD_TARGETING_FACETS

Tool to retrieve available ad targeting facets from LinkedIn Marketing API. Use when you need to discover what targeting options are available for ad campaigns (e.g., locations, industries, job functions).

NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

LINKEDIN_GET_AUDIENCE_COUNTS

Retrieves audience size counts for specified targeting criteria. Use when estimating reach for LinkedIn ad campaigns or targeted content.

NameTypeRequiredDescription
qstring ("targetingCriteriaV2")NoQuery type parameter. Must be 'targetingCriteriaV2' for targeting criteria queries.
targetingCriteriastringYesTargeting criteria with URL-encoded URNs. Format: (include:(and:List((or:(urn%3Ali%3AadTargetingFacet%3AFACET:List(urn%3Ali%3ATYPE%3AID)))))). IMPORTANT: Only the URN colons should be encoded as %3A, keep the structure syntax (parentheses, colons in 'and:' and 'or:') unencoded.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

LINKEDIN_GET_COMPANY_INFO

Retrieves organizations where the authenticated user has specific roles (ACLs), to determine their management or content posting capabilities for LinkedIn company pages.

NameTypeRequiredDescription
rolestring ("ADMINISTRATOR" | "DIRECT_SPONSORED_CONTENT_POSTER")NoThe specific role to filter organization ACLs by.
countintegerNoThe number of organization ACLs to return per page.
startintegerNoThe starting index for pagination, representing the number of initial ACLs to skip.
statestring ("APPROVED" | "REQUESTED")NoThe approval state of the role to filter by.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

LINKEDIN_GET_IMAGE

Tool to retrieve details of a LinkedIn image using its URN. Use when you need to check image status, get download URLs, or access image metadata for a single image.

NameTypeRequiredDescription
image_urnstringYesThe image URN identifier. Can be provided as 'urn:li:image:XXX' or just the ID 'XXX'. The URN will be URL-encoded automatically when making the API request.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

LINKEDIN_GET_IMAGES

Tool to retrieve image metadata including download URLs, status, and dimensions from LinkedIn’s Images API. Use when you need to access image details for posts, profiles, or media library assets.

NameTypeRequiredDescription
idsarrayYesList of image URNs to retrieve. Each URN should be in the format 'urn:li:image:{ID}' (e.g., 'urn:li:image:C4E10AQFn10iWtKexVA'). Maximum recommended batch size depends on LinkedIn’s API limits.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

LINKEDIN_GET_MY_INFO

Fetches the authenticated LinkedIn user’s profile information including name, headline, profile picture, and other profile details.

NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

LINKEDIN_GET_NETWORK_SIZE

Tool to retrieve the follower count for a LinkedIn organization. Use when you need to get the number of members following a specific company or organization on LinkedIn.

NameTypeRequiredDescription
edgeTypestring ("COMPANY_FOLLOWED_BY_MEMBER")NoThe type of network relationship to count. Use COMPANY_FOLLOWED_BY_MEMBER to get follower count.
organization_idstringYesThe unique identifier for the LinkedIn organization. This is the numeric ID from the organization URN (e.g., for 'urn:li:organization:3803', use '3803').
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

LINKEDIN_GET_ORG_PAGE_STATS

Tool to retrieve page statistics for a LinkedIn organization page. Use when you need engagement metrics like page views and custom button clicks. Supports both lifetime statistics (all-time data segmented by demographics) and time-bound statistics (aggregate data for specific time ranges). Requires rw_organization_admin permission with ADMINISTRATOR role for the organization.

NameTypeRequiredDescription
organizationstringYesOrganization URN in format urn:li:organization:{id}. Example: urn:li:organization:2414183.
timeRangeEndintegerNoInclusive ending timestamp in milliseconds since epoch. Only required for time-bound statistics. Omit for lifetime statistics.
timeRangeStartintegerNoExclusive starting timestamp in milliseconds since epoch. Only required for time-bound statistics. Omit for lifetime statistics.
timeGranularityTypestring ("DAY" | "MONTH")NoGranularity of the statistics. Use DAY for daily statistics or MONTH for monthly statistics. Only required for time-bound statistics.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

LINKEDIN_GET_PERSON

Retrieves a LinkedIn member’s profile information by their person ID. Returns lite profile fields (name, profile picture) by default, or basic profile fields (including headline and vanity name) with appropriate permissions.

NameTypeRequiredDescription
person_idstringYesThe unique identifier of the LinkedIn member. Note: Each member id is unique to the context of your application only.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

LINKEDIN_GET_POST_CONTENT

Tool to retrieve detailed post content including text, images, videos, and metadata from LinkedIn by post URN. Use when you need to fetch the full content and details of a specific LinkedIn post.

NameTypeRequiredDescription
post_idstringYesPost URN identifier in the format 'urn:li:ugcPost:{id}' or 'urn:li:share:{id}'. Can also be URL-encoded. Example: 'urn:li:ugcPost:7428263313739988992'.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

LINKEDIN_GET_SHARE_STATS

Retrieves share statistics for a LinkedIn organization, including impressions, clicks, likes, comments, and shares. Use to analyze content performance for an organization page. Optionally filter by time intervals to get time-bound statistics.

NameTypeRequiredDescription
time_intervalsstringNoTime-bound statistics filter in RestLi 2.0 complex object format. Specify time range and granularity as: '(timeRange:(start:<start_timestamp>,end:<end_timestamp>),timeGranularityType:<GRANULARITY>)' where timestamps are in milliseconds since epoch and GRANULARITY is one of: DAY, WEEK, MONTH. If omitted, returns lifetime statistics.
organizational_entitystringYesThe URN of the organization to retrieve share statistics for. Must be in the format 'urn:li:organization:<id>' (e.g., 'urn:li:organization:2414183'). Get organization IDs using the GET_COMPANY_INFO action.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

LINKEDIN_GET_VIDEOS

Retrieves video metadata from LinkedIn Marketing API. Supports single video retrieval, batch retrieval (multiple videos), and finding videos by associated account with pagination. Use when you need to get video details including duration, dimensions, status, download URLs, and media library information.

NameTypeRequiredDescription
countintegerNoNumber of elements to return for pagination, up to 1,000. Only used with 'associated_account'. Defaults to 10.
startintegerNoIndex where returned elements begin for pagination. Only used with 'associated_account'. Defaults to 0.
video_idsarrayNoList of video URNs for batch retrieval (e.g., ['urn:li:video:C4D10AQE9WE5n4uJKUg', 'urn:li:video:C5F10AQElP1fVH1Ke6g']). Mutually exclusive with 'video_urn' and 'associated_account'.
video_urnstringNoSingle video URN to retrieve (e.g., 'urn:li:video:C4E10AQGUkQY7trgh-Q'). Mutually exclusive with 'video_ids' and 'associated_account'.
associated_accountstringNoSponsored account URN to find videos by associated account (e.g., 'urn:li:sponsoredAccount:123456789'). Mutually exclusive with 'video_urn' and 'video_ids'.
media_library_statusstring ("ACTIVE" | "ARCHIVED")NoFilter by media library status. Only used with 'associated_account'. When omitted, returns all videos regardless of status.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

LINKEDIN_INITIALIZE_IMAGE_UPLOAD

Tool to initialize an image upload to LinkedIn and return a presigned upload URL plus the resulting image URN. Use when you need to prepare an image upload for LinkedIn posts. After calling this tool, upload the image bytes to the returned upload_url via PUT request, then use the image URN in CREATE_LINKED_IN_POST action.

NameTypeRequiredDescription
ownerstringYesOwner URN (person or organization) that will own the uploaded image. Must be in the format 'urn:li:person:{id}' for personal posts or 'urn:li:organization:{id}' for organization posts. Use the GET_MY_INFO action to retrieve the person ID.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

LINKEDIN_LIST_REACTIONS

Retrieves reactions (likes, celebrations, etc.) on a LinkedIn entity such as a share, post, or comment. Use when you need to see who reacted to content and what type of reactions were used.

NameTypeRequiredDescription
sortstring ("CHRONOLOGICAL" | "REVERSE_CHRONOLOGICAL" | "RELEVANCE")NoSort order for reactions. CHRONOLOGICAL sorts by created date ascending, REVERSE_CHRONOLOGICAL sorts by created date descending (default), RELEVANCE sorts by relevance to the viewer.
countintegerNoNumber of reactions to return per page.
startintegerNoStarting index for pagination (number of reactions to skip).
entitystringYesThe URN of the entity (share, post, or comment) to get reactions for. Format: 'urn:li:share:{id}', 'urn:li:ugcPost:{id}', 'urn:li:activity:{id}', or 'urn:li:comment:(activity:{activityId},{commentId})'. Do not URL-encode this value.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

LINKEDIN_REGISTER_IMAGE_UPLOAD

Tool to initialize a native LinkedIn image upload for feed shares and return a presigned upload URL plus the resulting digital media asset URN. Use when you need to upload an image to attach to a LinkedIn post. After calling this tool, upload the image bytes to the returned upload_url, then use the asset_urn in LINKEDIN_CREATE_LINKED_IN_POST.

NameTypeRequiredDescription
recipestringNoThe digital media recipe URN specifying the processing recipe for the image. Default is 'urn:li:digitalmediaRecipe:feedshare-image' for feed share images.
owner_urnstringYesURN of the owner entity that will own the uploaded image. Must be in the format 'urn:li:person:{id}' for personal posts or 'urn:li:organization:{id}' for organization posts. Use the GET_USER_INFO action to retrieve the person ID.
supported_upload_mechanismarrayNoArray of supported upload mechanisms. If not specified, LinkedIn will return the default mechanism (typically SYNCHRONOUS_UPLOAD).
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

LINKEDIN_SEARCH_AD_TARGETING_ENTITIES

Search for ad targeting entities using typeahead search. Use when you need to find targeting entities like geographic locations, job titles, industries, or other targeting criteria for LinkedIn ad campaigns.

NameTypeRequiredDescription
countintegerNoMaximum number of results to return per page.
facetstringYesAd targeting facet URN to specify the entity type to search (e.g., 'urn:li:adTargetingFacet:locations' for geographic locations, 'urn:li:adTargetingFacet:titles' for job titles, 'urn:li:adTargetingFacet:industries' for industries).
querystringYesSearch query string to find targeting entities (e.g., 'united states', 'software engineer', 'technology').
startintegerNoStarting index for pagination, representing the number of initial results to skip.
queryVersionstring ("QUERY_USES_URNS")NoQuery version for the search request.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.