---
title: "Login (may challenge)"
method: POST
path: "/linkedin/sessions"
tags: ["LinkedIn — Sessions"]
---

# Login (may challenge)

`POST /linkedin/sessions`

## Request

- Base URL: `https://anjal.app`
- URL: `https://anjal.app/linkedin/sessions`
- Auth: API key in header `X-API-Key`

Begin a LinkedIn login on behalf of the customer using their email +
password. Returns `{ ok: true, sessionId }` on direct success, or
`{ challenge: true, challengeId, challengeType }` if LinkedIn requires
a PIN (email/SMS) or mobile-app approval. Follow up with
`/sessions/verify` (PIN) or `/sessions/poll` (mobile approval).

## Request body

- object
  - `email` string, email, required
  - `password` string, password, required
  - `label` string: Optional friendly label for this session.

## Response `200`

Either a successful login or a challenge requirement.

- union
  - object
    - `ok` true
    - `sessionId` string
    - `label` string, nullable
    - `createdAt` string, date-time
  - object
    - `ok` false
    - `challenge` true
    - `challengeId` string
    - `challengeType` string
    - `verifyEndpoint` string
    - `pollEndpoint` string
    - `expiresAt` string, date-time

## Other responses

- `401`: Invalid email/password.
- `402`: LinkedIn module not subscribed.
- `403`: Session limit reached.

---

[API](https://skmtc.dev/anjal/apis/anjal-api.md) · [All operations](https://skmtc.dev/anjal/apis/anjal-api/llms.txt) · [OpenAPI document](https://skmtc.dev/anjal/apis/anjal-api/revisions/a4044778e294?raw)
