Base URL and authentication
All requests go to:Authorization header of every request:
401.
Create a token in the Gologin app: API & MCP > API > New Token, or in the API section under Connected accounts in the AI Assistant. A token can be created on a paid plan with two-factor authentication turned on in Gologin.
Sends are dry runs by default
Invitations, messages, comments and replies are sent only when you pass"send": true. Without it, the request is a dry run: it checks the target and tells you what would happen - who the recipient is, whether an invitation is possible, whether a conversation already exists - and sends nothing. Make the dry run first, then repeat the request with "send": true.
Publishing posts, reactions and accepting invitations use their own flags: publish, react and accept.
Connect an account
- Get your workspace ID:
GET https://api.gologin.com/workspaceswith the same token returns your workspaces and theirid. - Create the account:
- To sign in, pass one of:
credentials(loginandpassword),cookies, orbrowserProfileId- a Gologin profile that is already signed in to LinkedIn. - For the IP, pass
proxyCountry(the codes come fromGET /available-countries) or your ownproxy(host,port, and optionallyprotocol,username,password). A linked Gologin profile uses its own proxy. - To import existing conversations, add
"importHistory": true.
- The account comes back as
pendingwhile the setup runs. CheckGET /accounts/{id}untilstatuschanges:
Each wait lasts up to 10 minutes. An unsent code or an unconfirmed sign-in then ends in
auth_failed.
Find people and send an invitation
- Search.
GET /linkedin/people/search?accountId=ACCOUNT_ID&query=head%20of%20growthreturnsprofile_urlandprofile_idfor each person. Instead ofquery, you can passurl- a LinkedIn search link with its filters. - Check the profile.
GET /linkedin/profile?accountId=ACCOUNT_ID&profileUrl=PROFILE_URLshowsis_connected,is_pendingandis_available_to_connect. - Invite. Make a dry run first:
connectable_dry_run means the invitation would go out. not_connectable says why not: already_connected, invite_pending or connect_unavailable. Repeat the request with "send": true. sent_verified means LinkedIn created the invitation.
Send a message
POST /linkedin/messages/send takes accountId, message and one of:
profileUrl- to write to a person. The conversation with them is found, or opened if there isn’t one; the answer saysexisting_conversationornew_conversation. If only a paid InMail can reach the person, you getnot_messageablewithpaid_inmail_required. A paid InMail is never spent silently.conversationId- to continue a conversation: theconversation_idfrom/linkedin/inbox, a2-…thread ID or a thread URL.
sent_verified with message_id and conversation_id.
Read conversations
GET /linkedin/inbox?accountId=ACCOUNT_IDlists the account’s conversations, newest first.GET /linkedin/messages/conversation?accountId=ACCOUNT_ID&conversationId=CONVERSATION_IDreturns the messages, oldest first.limitkeeps the most recent ones.GET /workspaces/{workspaceId}/conversationslists conversations of all accounts in the workspace, andGET /workspaces/{workspaceId}/inbox/unreadreturns the unread counts.
Get new messages on a webhook
{ accountId, workspaceId, event }. Delivery is retried on errors, and the same event can arrive twice, so deduplicate by event.id. To remove the webhook, send {"url": null}. Localhost and internal addresses aren’t accepted.
Limits
API actions count toward the same limits as the app.GET /accounts/{id}/limitsreturns the account’s stage and every limit: the recommended value, your own value, the applied value, how much is used andresetsAt- when the window has room for one more action.PUT /accounts/{id}/limitschanges thestageor your own values incustomLimits. Anullvalue removes your own value.DELETE /accounts/{id}/limits/customresets all limits to the recommended ones.GET /workspaces/{workspaceId}/accounts-usageshows how many accounts your workspace can connect and how many seats are taken.
Errors worth knowing
Warm up before a batch
A session that sits unused goes stale, and the first call after that takes seconds. CallPOST /accounts/{id}/warmup before a batch of calls or right after signing in again. The account must be active.