This guide explains how to handle LinkedIn cookies, manage user accounts, and
understand the different LinkedIn licenses supported on Captain Data.
Handling LinkedIn Accounts
Adding a New User
To automate LinkedIn actions, you must first add a user on Captain Data using the API EndpointPOST Create or Update User.
Example Request Body:
Linking LinkedIn Accounts to Users
After adding a user, you will connect an integration account in order to link the LinkedIn account to the user using the API EndpointPOST - Add or Update an Integration Account.
The core of the LinkedIn integration are the cookies, which allow us to perform the desired actions on LinkedIn.
Here’s an example account payload, using the previously created user_uid:
Reminder: A Shared Account allows external users to connect their accounts
via a Captain Data shared link, which grants them access to sync their
credentials.
Best Practices for LinkedIn Automation
VPN and Country Settings- Ensure the country in Captain Data matches your login location on LinkedIn.
- Match your VPN’s country with Captain Data, or disconnect the VPN while logging in.
- Use Captain Data’s Chrome Extension to automatically sync cookies.
- For multiple LinkedIn accounts, you must create separate Chrome sessions:
- Click your Chrome profile icon > Add a new profile.
- Name it according to the LinkedIn account (e.g., “Account B”).
- Log in to Captain Data and LinkedIn within this new session.
Refreshing Cookies
Cookies need refreshing if:- You log out of LinkedIn
- LinkedIn expires or changes cookies
- LinkedIn restricts the account due to excessive activity
How to refresh cookies via API
In order to refresh accounts via API you need to use the POST - Add or Update an Integration Account by passingli_a and/or li_at cookie values.
Here’s a code example for a Chrome Extension that runs in the background using alarms:
Complete source code is available on
GitHub.
Smart Limits to Prevent Account Restrictions
LinkedIn Licenses Compatibility
Captain Data supports various LinkedIn licenses, each with unique features and limitations. Below is a breakdown of how each license integrates with Captain Data:| License | Captain Data Level | Captain Data Compatibility | InMails/Month | Invitations with Note | CRM Integration |
|---|---|---|---|---|---|
| LinkedIn Basic | Classic | Yes | 0 | 5/month | No |
| LinkedIn Premium Career | Classic | No | 5 | N/A | No |
| LinkedIn Premium Business | Classic | Yes | 15 | 400 | No |
| Sales Navigator Core | Sales Navigator | Yes | 50 | 400 | No |
| LinkedIn Sales Solutions | N/A | N/A | N/A | N/A | N/A |
levels in the LinkedIn integration.
Troubleshooting LinkedIn Login Errors
When connecting a LinkedIn account (via cookies or native login), you may encounter various errors. Below is a guide to the most common error cases, their meanings, and how to resolve them.Common Error Cases
| Scenario | Message | Status | Error |
|---|---|---|---|
| Invalid credentials | Username or password invalid. | 400 | INVALID_CREDENTIALSCheck your LinkedIn username and password. See authentication endpoint |
| Google login not supported | Username or password invalid. | 400 | INVALID_CREDENTIALSGoogle login is not supported. Use “Forgot password” on LinkedIn to set a password and use that for login. |
| Checkpoint code invalid | Code invalid. | 400 | INVALID_CODEThe checkpoint (2FA/SMS/email) code is incorrect. Try again. See checkpoint endpoint |
| Failed IP attribution | Could not login the account. | 500 | LOGIN_ACCOUNT_500_ERRORRetry logging in. This is a LinkedIn-side issue. |
| IP allocation error | IP allocation error. Please retry again in 5 minutes or contact support. | 400 | IP_ATTRIBUTION_ERROR_400Wait 5 minutes and try again, or contact support. |
| IP allocation conflict | IP allocation error. Please retry again in 5 minutes or contact support. | 409 | IP_ATTRIBUTION_CONFLICT_409Wait 5 minutes and try again, or contact support. |
| IP rate limit exceeded | Rate limit exceeded IP attribution, please try again in five (5) minutes or contact the support. | 429 | IP_ATTRIBUTION_RATE_LIMIT_429Wait 5 minutes and try again, or contact support. |
| No IP available in timezone | No IP available in this timezone. Update your timezone to a neighbouring one or contact support. | 400 | IP_TIMEZONE_NOT_SUPPORTED_400Change your timezone in Captain Data or contact support. |
| Captcha challenge | Error while resolving the challenge, the Captcha challenge seem to be pending. Re-send username and password to overcome this. | 500 | CAPTCHA_CHALLENGE_ERRORRetry the authentication with your credentials. |
| Unsupported challenge | Unsupported challenge identified, please contact the support and provide it with the user_uid so we can address it. | 500 | UNSUPPORTED_CHALLENGEContact support with your user_uid. |
| Simple challenge failed | Error while solving challenge, retry in 5 minutes, if it persists contact support. | 500 | LOGIN_SIMPLE_CHALLENGEWait and retry, or contact support. |
| In-app challenge pending | Waiting for user to validate in_app_challenge | 500 | IN_APP_CHALLENGE_PENDINGComplete the challenge in your LinkedIn app. |
| In-app challenge expired | In_app_challenge expired. Please retry the whole process by sending credentials again on /authenticate | 500 | IN_APP_CHALLENGE_EXPIREDStart the login process again. |
| 2FA expired | 2FA expired. Please retry the whole process by sending credentials again on /authenticate | 500 | 2FA_VALIDATION_EXPIREDStart the login process again. |
| Checkpoint missing data | Error while solving the challenge, retry the whole process by sending credentials to /authenticate again | 500 | CHECKPOINT_MISSING_DATAStart the login process again. |
| User management not permitted | User management via the API is not permitted for the current workspace, activate the option on settings | 403 | CREATE-ONE-ACCOUNT-403-FORBIDDENEnable user management in your workspace settings. |
| Account with same LinkedIn ID already exists | An account with the same Linkedin ID already exists. | 409 | CREATE_OR_UPDATE_ACCOUNT_409_CONFLICTUse a different LinkedIn account or user. |
| Account already exists on user | An account already exist on this user | 409 | CREATE_OR_UPDATE_ACCOUNT_409_CONFLICTThis will be merged in the future. |
| Account link change | Please note that your account is different from the one that has already been synchronized. | 409 | CREATE_OR_UPDATE_ACCOUNT_409_CONFLICTUse the same LinkedIn account as previously connected. |
| Other errors | Error while synchronizing your account, please retry again or contact the support. | 500 | - Retry or contact support. |
Notes & Recommendations
- Google Login: If your LinkedIn account uses Google login, you must set a password on LinkedIn (via “Forgot password”) to use native login.
- IP/Location Issues: Many errors are related to IP allocation or location mismatches. Make sure your timezone and country settings in Captain Data match your actual login location.
- Challenge/2FA: If you receive a challenge (SMS, email, in-app), complete it promptly. If it expires, restart the login process.
- Contact Support: For persistent or unclear errors, contact support and provide your
identity_uidfor faster resolution.