Adding & Managing Users
Comprehensive guide to syncing Users and Integrations with the Captain Data API v4.
The first step in using the Captain Data API (v4) to manage users is to synchronize your SaaS users with your Captain Data workspace.
Here’s a quick recap of the ways Captain Data can adapt to your needs:
- White Label – Fully branded solutions where Captain Data runs in the background, allowing your brand to take the spotlight.
- White Label — Stealth Mode – Run Captain Data’s API with rented LinkedIn accounts—no Chrome Extension required. Check out this article for more information: When to Sync Users vs. Use Rented LinkedIn Accounts
- Grey Label – Combine Captain Data’s Chrome Extension with shared accounts, utilizing our branded Captain Data connection flow.
When integrating your SaaS with Captain Data, it’s important to understand the distinction between Users and Integrations.
- Users: Each user on your SaaS corresponds to a user in Captain Data. Think of a user as a license that enables automation for that individual.
- Integrations: Integrations are the specific integrations (like LinkedIn) attached to a user, allowing them to run automations on specific platforms.
1. Create a User
To enable automation for a User, create the user by sending a POST request to the Create a User endpoint:
The email of the user.
The user’s full name.
The user’s timezone.
The timezone
field provisions a proxy IP matching that timezone/country.
This needs to match the location where you log into your LinkedIn account to
avoid restrictions.
When using a VPN, either: 1. Log out of your VPN before accessing social media, or 2. Ensure the “timezone” you send matches the country of the VPN IP address.
Save the User’s uid
Once the request is successful, Captain Data will return a User’s uid
.
Save this as user_uid
in your own user database - you’ll need it for:
- Connecting integrations for this User
- Launching actions, via the
integration_users
field
💡 When launching an action, always pass the User’s uid
via the
integration_users
field. You do not need to pass the Integration’s UID.
2. Connect a User’s Integration
To run most automations, your users must be linked to the platform(s) they’ll act on, like LinkedIn. This section walks you through creating a user and connecting the necessary integrations using Captain Data’s API.
Once you have created a user, the next step is to attach an integration. This integration enables the user to automate specific platforms, like LinkedIn, through Captain Data.
Request Body
To create or update an integration, use the POST method for the Connect a User’s Integration endpoint. Here’s an example for a COOKIES integration type (like LinkedIn):
Name of the LinkedIn account, e.g. “LinkedIn Account #1”. It’s generally the
User’s full_name
or email
.
For COOKIES integration types, provide authentication cookies here.
Important note: If you’re connecting an account for LinkedIn Sales
Navigator, you need to send both cookies. If you don’t include the li_a
token, the connection may not work properly with LinkedIn Sales Navigator.
Including the li_a
token will also speed up account synchronization.
Supported Authentication Types
Captain Data supports the following integration types:
- COOKIES
- BASIC
- OAUTH
- APIKEY
Each type may require a slightly different request body. The example provided is for a COOKIES integration.
Save the Integration’s uid
Once the request is successful, Captain Data will return an Integration’s uid
.
Save this uid
in your own database model if you need to update or remove it later, for example.
Native LinkedIn Authentication
You can also authenticate LinkedIn accounts using email and password credentials. This method uses Captain Data’s native LinkedIn authentication system.
Here’s an example request using the Connect a LinkedIn Account (Username/Password) endpoint: