How to Set Up LinkedIn API for WordPress
Complete guide to connecting WordPress with LinkedIn. Takes about 10 minutes. ⏱️
This guide works with our Devenia LinkedIn Autoposter plugin, but the LinkedIn setup applies to any app using the LinkedIn API.
Step 1: Create a LinkedIn App
- Go to LinkedIn Developer Portal
- Click “Create app” (blue button, top right)
- Fill in the form:
- App name: Something like “My Website Autoposter” (users won’t see this)
- LinkedIn Page: Select your company page. If you don’t have one, you’ll need to create a LinkedIn Company Page first.
- Privacy policy URL: Your website’s privacy policy (e.g., https://yoursite.com/privacy)
- App logo: Upload any square image (minimum 100x100px)
- Check the legal agreement box and click “Create app”
Step 2: Add Required Products
LinkedIn requires you to “request access” to specific features. Don’t worry – these are approved instantly.
- In your new app, click the “Products” tab
- Find “Share on LinkedIn” and click “Request access”
- Find “Sign In with LinkedIn using OpenID Connect” and click “Request access”
- Both should show as “Added” within seconds
Want to post to a Company Page? You’ll also need the “Advertising API”. Click “Request access” – this one takes 1-5 business days for LinkedIn to approve. You can still post to your personal profile while waiting.
Step 3: Get Your Credentials
- Click the “Auth” tab
- You’ll see your Client ID – copy this somewhere safe
- Click the eye icon next to Client Secret to reveal it, then copy it
⚠️ Keep your Client Secret private! Anyone with this can post to your LinkedIn. Never share it publicly or commit it to version control.
Step 4: Add the Redirect URL
This tells LinkedIn where to send users after they authorize your app.
- Still in the “Auth” tab, scroll down to “OAuth 2.0 settings”
- Under “Authorized redirect URLs for your app”, click the pencil icon to edit
- Click “+ Add redirect URL”
- Enter your WordPress callback URL. For our plugin, it’s:
https://yoursite.com/wp-admin/options-general.php?page=dlap-settings
(Replace “yoursite.com” with your actual domain) - Click “Update”
Step 5: Connect Your WordPress Plugin
- In WordPress, go to Settings → LinkedIn Autoposter
- Paste your Client ID and Client Secret
- Click “Save Changes”
- Click “Connect to LinkedIn”
- You’ll be redirected to LinkedIn – click “Allow” to authorize
- You’ll be redirected back to WordPress with a success message
That’s it! Your WordPress site is now connected to LinkedIn. New posts will be shared automatically.
Posting to a Company Page (Optional)
If you want posts to appear on your company page instead of (or in addition to) your personal profile:
- Request Advertising API access (Step 2 above) and wait for approval
- Find your Company Page ID:
- Go to your company page on LinkedIn
- Click “Admin tools” → “Manage page”
- Look at the URL – it will be like: linkedin.com/company/12345678/admin/
- That number is your Organization ID
- In the plugin settings, enter the Organization ID
- Select “Company Page” or “Both” under Post Target
- Click “Reconnect” to authorize the additional permissions
Common Issues
“Redirect URL mismatch” error
The URL in your LinkedIn app settings must exactly match what WordPress sends. Check for:
- http vs https (must match)
- www vs non-www (must match)
- Trailing slashes
“Token expired” after 60 days
This is normal. LinkedIn limits tokens to 60 days for security. Just click “Reconnect” in the plugin settings. The plugin will email you a warning before expiration.
“Organization permissions” error when posting to company page
You need Advertising API access. Check the Products tab in your LinkedIn app – if “Advertising API” isn’t listed as added, request it and wait for approval.
Need the Plugin?
Get our free LinkedIn Autoposter plugin to automatically share your WordPress posts.