LinkedIn认证与Graph API请求报410错误,v1 API资源失效求助
Hey Prabhakar, this isn't a random universal glitch — it's a deliberate platform change from LinkedIn that's affecting all apps still relying on their v1 API. Let me break down what's happening and how to get your app back up and running:
The Root Cause
Back in March 2018, LinkedIn fully retired all v1 API endpoints as part of their official upgrade to the v2 platform. That's exactly why you're seeing the 410 Gone error with the message "This resource is no longer available under v1 APIs" — those endpoints are permanently shut down, not just temporarily down for maintenance.
How to Fix Your Integration
You'll need to migrate your app to use LinkedIn's v2 API. Here's what you need to address your two core use cases:
1. New User Registration & Existing User Authentication
- Switch to LinkedIn's v2 OAuth 2.0 flow to generate valid v2 access tokens.
- Request the appropriate v2 permissions for user data:
r_liteprofileto pull basic user profile informationr_emailaddressto access the user's email (if required for registration)
- Important note: v2 tokens use different scopes than v1, so you'll need to re-authorize existing users to get new tokens with the correct v2 permissions.
2. Content Sharing
Replace your old v1 share endpoint (https://api.linkedin.com/v1/people/~/shares) with the v2 equivalent:
https://api.linkedin.com/v2/shares
The request format also differs for v2 — here's a simple example of a valid JSON request body:
{ "owner": "urn:li:person:{USER_PERSON_ID}", "text": { "text": "Check out this content shared from our app!" } }
Don't forget to set the Content-Type: application/json header and include your v2 access token in the Authorization: Bearer {YOUR_V2_TOKEN} header.
Additional Next Steps
- Update your app's permission settings in the LinkedIn Developer Portal to include the v2 scopes you need.
- Review LinkedIn's official migration guides (available directly in their developer portal) for detailed specs on any other endpoints your app uses.
This migration is mandatory to restore LinkedIn functionality in your app — there's no way to continue using the retired v1 endpoints.
内容的提问来源于stack exchange,提问作者PrabhakarP

