Any queries to the api.linkedin.com/v2/ return “Not enough permissions to access …”

前端 未结 3 705
野性不改
野性不改 2020-12-02 18:25
  1. I got the Access Token (with scope: r_basicprofile rw_company_admin w_share) using the Client ID, Client Secret at following UR
相关标签:
3条回答
  • 2020-12-02 19:03

    You need to request permissions from LinkedIn.

    Now all requests to api.linkedin.com/v2/ successfully pass to me!

    We received permissions (r_ad_campaigns and rw_organization) after request offer by address https://business.linkedin.com/marketing-solutions/marketing-partners/become-a-partner/marketing-developer-program

    Leave a request at the address below and LinkedIn will answer you.

    Good luck!

    0 讨论(0)
  • 2020-12-02 19:06

    Use r_liteprofile instead of r_basicprofile during the first step of Authorization. This will solve your issue.

    0 讨论(0)
  • 2020-12-02 19:20

    API access changed and what you received with only 1 API call, now has to be rewritten to make multiple API calls

    Before, using scope "r_basicprofile, r_emailaddress" you could get

    • User basic info as name, location etc
    • LinkedIn user profile URL
    • Email
    • Avatar image

    Now you can use "r_basicprofile" that will get you user LinkedIn public URL only if you are in a partner program, and it is not easy to get in!

    If you want to get access_token which you can use to get basic profile info + email, now you have to request it with a scope "r_liteprofile,r_emailaddress"

    and use this 3 API calls to get all the details, unfortunately without Linkedin public URL (if anyone knows how to get this, please comment so I can modify the answer)

    1. profile info - https://api.linkedin.com/v2/me
    2. email - https://api.linkedin.com/v2/clientAwareMemberHandles?q=members&projection=(elements*(primary,type,handle~))
    3. profile image - https://api.linkedin.com/v2/me?projection=(id,profilePicture(displayImage~:playableStreams))
    4. public profile URL - not possible!

    Acess token

    Use this link for retrival description

    https://docs.microsoft.com/en-us/linkedin/shared/authentication/client-credentials-flow?context=linkedin/consumer/context

    0 讨论(0)
提交回复
热议问题