2

I am trying to set up sharing of post via application.

As per doc - https://learn.microsoft.com/ru-ru/linkedin/consumer/integrations/self-serve/share-on-linkedin I have created an app. And I need to have a URN. But I cannot find in docs where from I can get URN. How can I define it? I couldn't find an aswered question like mine here.

3
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.
    – Community Bot
    Commented Feb 9 at 8:23
  • I am trying to post an info in an organization account in LinkedIn, for example, announcement info. As per doc I need to send a post request with URN inside it. I am struggling to get this URN first.
    – Maq
    Commented Feb 9 at 14:41
  • I already have set an application with OAuth 2.0 scope w_member_social. And I have get organization page verified.
    – Maq
    Commented Feb 9 at 14:48

1 Answer 1

1

I had the same issue and I found how to fix it.

You can use this to get the user information: https://learn.microsoft.com/es-es/linkedin/consumer/integrations/self-serve/sign-in-with-linkedin-v2#api-request-to-retreive-member-details

The returning json code looks like this:

{
        "sub": "782bbtaQ",
        "name": "John Doe",
        "given_name": "John",
        "family_name": "Doe",
        "picture": "https://media.licdn-ei.com/dms/image/C5F03AQHqK8v7tB1HCQ/profile-displayphoto-shrink_100_100/0/",
        "locale": "en-US",
        "email": "[email protected]",
        "email_verified": true
}

Here what you want is the "sub" field, that acts like the id to create the urn you need to post. Now you just have to follow the format: e.g - urn:li:person: + sub

One thing I had trouble with was the scope when authenticating the user. Pay attention to the scope required, here you can see what scope is needed: https://learn.microsoft.com/es-es/linkedin/consumer/integrations/self-serve/share-on-linkedin#authenticating-members

I hope you can solve the error!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.