You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

LinkedIn API调用/me接口提示权限不足问题求助

Fixing LinkedIn v2/me API 403 "Not enough permissions" Error

Let’s break down why you’re hitting this 403 error and how to fix it—this is a common gotcha when working with LinkedIn’s v2 APIs.

The Core Issue: Mismatched Permissions for v2 API

Your current permissions (r_basicprofile, r_fullprofile) are legacy v1 API scopes, and they don’t work with LinkedIn’s v2 /me endpoint. For v2, you need v2-specific scopes:

  • r_liteprofile: Required to access basic profile data (name, profile photo, headline, etc.) via /me
  • r_memberprofile: For more detailed profile data (work experience, education, etc.)—note this scope may require additional approval from LinkedIn
  • Keep r_emailaddress if you need access to the user’s email, and w_share if you need post permissions

Step-by-Step Fix

  1. Update Your Authorization Scope
    When initiating the OAuth2 flow, replace your old scopes with v2-compatible ones. For basic profile access, use:
    r_liteprofile r_emailaddress w_share

  2. Re-Generate Your Access Token
    Old access tokens retain the original permissions, so you’ll need to go through the full OAuth2 authorization flow again to get a new token with the updated scopes.

  3. Add the Required Request Header
    LinkedIn’s v2 APIs require the X-Restli-Protocol-Version header to handle requests correctly. Many developers miss this, which can trigger misleading permission errors. Here’s your corrected curl command:

    curl -H "Authorization: Bearer YOUR_NEW_ACCESS_TOKEN" \
         -H "Accept: application/json" \
         -H "Content-Type: application/json" \
         -H "X-Restli-Protocol-Version: 2.0.0" \
         https://api.linkedin.com/v2/me
    
  4. Verify Your Token’s Scopes
    Use LinkedIn’s official token inspection tool to confirm your new access token includes the r_liteprofile (or r_memberprofile) scope. This helps rule out any issues with the authorization flow.

Additional Notes

  • If you’re requesting r_memberprofile, you’ll need to submit access to LinkedIn for review—this scope isn’t available by default for most apps. Stick with r_liteprofile if you only need basic profile data.
  • Double-check that your app is configured correctly in the LinkedIn Developer Portal, ensuring the redirect URI and scopes match what you’re using in your authorization flow.

内容的提问来源于stack exchange,提问作者Krzysztof Makowski

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.28 03:53:04