How to create new LinkedIn text post using LinkedIn API?

Jahanzaib Babar 5 Reputation points
2024-03-17T22:36:49.73+00:00

Hey,
I want to create a new text post on behalf of the user. However, after extensive exploration, I have discovered that I require a User Profile URN to initiate this action. Despite several hours of effort, I have been unable to locate a reliable resource to obtain this information

When I call this API endpoint (to get member URN):

https://api.linkedin.com/v2/me

It showed this error:

{'serviceErrorCode': 100, 'message': 'Not enough permissions to access: GET /me', 'status': 403}  

I have both products/permission enabled, the 'Sign In with LinkedIn using OpenID Connect' and 'Share on LinkedIn'.

.
Moreover, I'm using these endpoints to create new posts:

https://api.linkedin.com/v2/posts

And

https://api.linkedin.com/v2/ugcPosts

Both require URN.

If there is an alternative method or resource available to facilitate the creation of a new text post, I would greatly appreciate your guidance. Your assistance in this matter would be invaluable to me.

Thank you for your consideration.

JavaScript API
JavaScript API
An Office service that supports add-ins to interact with objects in Office client applications.
908 questions
Microsoft Partner Center API
Microsoft Partner Center API
Microsoft Partner Center: A Microsoft website for partners that provides access to product support, a partner community, and other partner services.API: A software intermediary that allows two applications to interact with each other.
318 questions
0 comments No comments
{count} votes