How to Get a LinkedIn API Key: Client ID, Products and Tokens
To get a LinkedIn API key, go to developer.linkedin.com, click My apps then Create app, link a LinkedIn Page, and copy the Client ID and Primary Client Secret from the Auth tab. Only Sign In with LinkedIn using OpenID Connect and Share on LinkedIn are self-serve under the Products tab; Advertising, Community Management and other APIs need an access request and review. Access tokens last 60 days.
A LinkedIn API key is the Client ID of an app you create in LinkedIn's developer portal; LinkedIn's docs call it the consumer key or API key too. With the Client Secret, it gets you OAuth access tokens. What those tokens can do depends entirely on the products your app is approved for, and most are gated. For prices and what the API will not return, see Is the LinkedIn API free?
What you need
- A LinkedIn member account.
- A LinkedIn Page (company page). Every app must be linked to one, and the link is permanent (LinkedIn Help).
- A super admin of that Page who can approve verification.
- A privacy policy URL and an app logo.
- For gated products: a registered legal organization and a business email.
How to get a LinkedIn API key, step by step
- Open the portal. Go to developer.linkedin.com and click My apps, then Create app.
- Fill the form. App name; LinkedIn Page (search by name or URL, or Create a new LinkedIn Page); Privacy policy URL; Upload a logo; tick "I have read and agree to these terms". Click Create app.
- Verify the Page link. In the app, open Settings and click Verify. In the Verify company dialog, click Generate URL, then Copy URL, send it to a Page super admin, and click I'm done. The admin has 30 days (verification help).
- Copy your keys. On the Auth tab, copy the Client ID and Primary Client Secret.
- Add a redirect URL. Also on the Auth tab. It must be absolute HTTPS with no
#. - Add products. On the Products tab, request the products you need (table below).
LinkedIn API products and access
| Product | Scopes | Access |
|---|---|---|
| Sign In with LinkedIn using OpenID Connect | openid, profile, email | Self-serve |
| Share on LinkedIn | w_member_social | Self-serve |
| Advertising API | Ads scopes | Access request, then Development tier |
| Community Management API | Organization Page scopes | Review; commercial organizations only |
| Sales Navigator, Talent | Partner scopes | Partner programs |
LinkedIn says open permissions are the only ones available to all developers without approval (getting access). None of the self-serve products returns other members' profiles. For ads data specifically, our LinkedIn Advertising API guide goes deeper.
Development vs Standard tier
Approved marketing apps start in the Development tier (increasing access):
- Advertising API, Development: unlimited reads on ad accounts you administer, one test ad account created through the API, edits on up to 5 ad accounts. Standard is requested by support ticket.
- Community Management API, Development: 500 calls per app and 100 per member per 24 hours, no batch gets, no webhooks, and 12 months to build. Standard needs a screencast and test credentials (review guide).
LinkedIn gives no review timeline. A rejected Community Management app must apply again as a new app.
Get a LinkedIn access token
The quick way: the OAuth Token Generator in the portal's Docs and Tools menu. Select your app and scopes, approve, then Copy token (portal tools).
The code way, 3-legged OAuth (authorization code flow). Send the member to:
https://www.linkedin.com/oauth/v2/authorization?response_type=code&client_id=CLIENT_ID&redirect_uri=https%3A%2F%2Fexample.com%2Fli%2Fcallback&state=RANDOM&scope=openid%20profile%20email
The code lasts 30 minutes. Exchange it:
curl -X POST "https://www.linkedin.com/oauth/v2/accessToken" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "grant_type=authorization_code&code=CODE&client_id=CLIENT_ID&client_secret=CLIENT_SECRET&redirect_uri=https%3A%2F%2Fexample.com%2Fli%2Fcallback"
First request: who am I
curl "https://api.linkedin.com/v2/userinfo" -H "Authorization: Bearer ACCESS_TOKEN"
It returns sub, name, given_name, family_name, picture, locale and, with the email scope, email (OpenID Connect docs). In Python, with the version headers that the versioned /rest/ APIs require:
import os
import requests
TOKEN = os.environ["LINKEDIN_TOKEN"]
me = requests.get("https://api.linkedin.com/v2/userinfo",
headers={"Authorization": f"Bearer {TOKEN}"}, timeout=30)
me.raise_for_status()
print(me.json()["name"], "urn:li:person:" + me.json()["sub"])
# Versioned marketing APIs live under /rest/ and need both headers.
REST_HEADERS = {
"Authorization": f"Bearer {TOKEN}",
"Linkedin-Version": "202610", # YYYYMM
"X-Restli-Protocol-Version": "2.0.0",
}
LinkedIn releases a version each month and supports each for at least a year; unversioned /rest/ calls are refused (versioning).
How long does a LinkedIn access token last?
| Token | Lifetime | Renewal |
|---|---|---|
| Authorization code | 30 minutes | One use |
| 3-legged access token | 60 days (expires_in 5184000) | Re-run the flow; the consent screen is skipped if the member is logged in |
| Refresh token | 365 days, not extended by refreshing | Only for approved Marketing Developer Platform partners (refresh tokens) |
| 2-legged (client credentials) | 30 minutes | Only if LinkedIn enabled it for your app (client credentials) |
Worked example for partners: refresh on day 59 and the access token is good for 60 more days, but the refresh token keeps its original clock, with 306 days left. Plan a full re-consent before day 365. Note also that requesting a different set of scopes invalidates earlier tokens.
Rate limits
LinkedIn counts per app and per member over 24 hours, resetting at midnight UTC, and does not publish standard numbers; your app's Analytics tab shows usage for endpoints you called that day (rate limits). Published exceptions: Share on LinkedIn allows 150 requests per member and 100,000 per app per day (Share on LinkedIn).
Common LinkedIn API errors
| Status | Cause | Fix |
|---|---|---|
| 401 at token time | Redirect URI or client ID mismatch, invalid scope | Use the exact redirect from the Auth tab; request only scopes your products grant |
401 access_denied on client credentials | App not allowed to create application tokens | Use 3-legged OAuth |
| 401 on API calls | Empty, expired or revoked token | Get a new token |
| 403 | Missing permission or scope | Add the product or scope |
| 426 | Deprecated Linkedin-Version | Send a current YYYYMM |
| 429 | Daily throttle reached | Wait for midnight UTC |
From LinkedIn's error handling page. Error bodies carry serviceErrorCode, which is the field to search on.
If you just need public data
If what you need is public company pages, posts or profiles, the official products will not return them without partner access. ScrapeIO reads public LinkedIn pages by URL: the LinkedIn company API, company posts API, profile API and post search API, at 1 credit a call. See LinkedIn company page scraper and the LinkedIn MCP server.
curl "https://scrapeio.com/v1/linkedin/company?url=https://www.linkedin.com/company/microsoft" \
-H "x-api-key: YOUR_KEY"
FAQ
Where is my LinkedIn API key?
On your app's Auth tab in the developer portal: the Client ID is the API key, next to the Primary Client Secret.
Do I need a company page to get a LinkedIn API key?
Yes. Every app is linked to a LinkedIn Page when you create it, and a Page super admin verifies the link.
Can I get LinkedIn profile data from the API?
Only the signed-in member's own basic profile and email through OpenID Connect. Other members' profiles are not in the self-serve products.
How long does LinkedIn API approval take?
LinkedIn publishes no timeline for Advertising or Community Management access. Self-serve products are added right away.
Is the LinkedIn API free?
LinkedIn does not charge per call for its developer products; the cost is approval. Details are in our LinkedIn API pricing post.
Sources
Checked on 9 November 2026 from each vendor's own pages. Prices and limits change; follow the links before you decide.
- https://www.linkedin.com/help/linkedin/answer/a1667239
- https://www.linkedin.com/help/linkedin/answer/a1665329
- https://learn.microsoft.com/en-us/linkedin/shared/authentication/getting-access
- https://learn.microsoft.com/en-us/linkedin/marketing/increasing-access
- https://learn.microsoft.com/en-us/linkedin/marketing/community-management-app-review
- https://learn.microsoft.com/en-us/linkedin/shared/authentication/developer-portal-tools
- https://learn.microsoft.com/en-us/linkedin/shared/authentication/authorization-code-flow
- https://learn.microsoft.com/en-us/linkedin/consumer/integrations/self-serve/sign-in-with-linkedin-v2
- https://learn.microsoft.com/en-us/linkedin/marketing/versioning
- https://learn.microsoft.com/en-us/linkedin/shared/authentication/programmatic-refresh-tokens
- https://learn.microsoft.com/en-us/linkedin/shared/authentication/client-credentials-flow
- https://learn.microsoft.com/en-us/linkedin/shared/api-guide/concepts/rate-limits
- https://learn.microsoft.com/en-us/linkedin/consumer/integrations/self-serve/share-on-linkedin
- https://learn.microsoft.com/en-us/linkedin/shared/api-guide/concepts/error-handling
100 free credits, no card. Credits never expire.
Get API key