Options for posting via the API to LinkedIn
JSON for a basic post with a link and image to LinkedIn:
"post": "The best LinkedIn post ever #best https://www.linkedin.com",
- LinkedIn will automatically preview the link in the post unless there is an image or video included. In the above example the image will show. Removing the image will cause the link preview to show.
- Hashtags are clickable in LinkedIn. Use the # symbol to specify a LinkedIn hashtag.
- If your video doesn't end in a known video extension such as mp4, please use the
isVideoparameter. See the /post endpoint for details.
- LinkedIn video processing takes several minutes to complete. Please wait before trying the share URL or getting video analytics.
You must be a "Super Admin" to connect a LinkedIn company page. If you don't see your Company Page when linking, please verify you are a Super Admin for that Page.
Set a thumbnail for a video. Send a remote URL of a PNG or JPG file that is the same dimensions as the video and less than 10 MB. URL should end in .png or .jpg.
Add alternative text, also known as alt text, to a LinkedIn image. LinkedIn alt text is an accessibility feature used for additional user info and screen readers. LinkedIn does not support altText on videos.
"altText": ["This is my best pic", "😃 here is the next one"] // Array of Alt Texts
Each alt text must correspond to an image in the
mediaUrlsarray. The alt text will be applied to each image in order.
Add title or media captions to LinkedIn images or videos.
"titles": ["This is an amazing video", "😃 here is the next one"] // Array of Alt Texts
Each title must correspond to an image or video in the
mediaUrlsarray. The title will be applied to each image or video in order.
You may post up to 9 image URLs in the mediaUrls to LinkedIn.
"mediaUrls": ["https://url1", ..., "https://url9"]
LinkedIn does not yet support carousel images for organic posts.
Mention another LinkedIn organization handle by adding
@handlein the post text. The
@handleis the name of the company or organization. For example,
- Ayrshare's LinkedIn company profile is https://www.linkedin.com/company/ayrshare and the handle used would be @ayrshare.
- Zara's LinkedIn company profile is https://www.linkedin.com/company/zara-sa/ and the handle used would be @zara-sa.
"post": "The best social media API @ayrshare ever!",
If the @mention is not found, the @ will be removed from the post since LinkedIn will not accept posts with unresolved mentions.
LinkedIn must be reauthorized every year via the Social Accounts page.
- An email and webhook social action notification will be sent 10 days in advance of authorization expiration.
- The user will see on their social account linkage page an alert and a refresh button 30 days prior to expiration.