Common Errors
When a request fails, the response has success: false and an error object (see Response structure):
{
"success": false,
"error": {
"type": "invalidLinkedApiToken",
"message": "The provided 'linked-api-token' is invalid."
}
}type– the error identifier. Handle errors in your code bytype.message– a human-readable explanation for logs and people.
The same request with an invalid linked-api-token, and the response it gets:
In the SDKs a failed request throws LinkedApiError with the same type and message:
In the CLI a failed request writes the same type and message to stderr as {"error", "message"} and exits with a non-zero exit code: 2 for token errors, 3 for subscription errors, 6 for tooManyRequests.
curl -i -X POST https://api.linkedapi.io/workflows \
-H "Content-Type: application/json" \
-H "linked-api-token: invalid-token" \
-H "identification-token: your-identification-token" \
-d '{"actionType": "st.checkConnectionStatus", "personUrl": "https://www.linkedin.com/in/person1"}'
# HTTP/2 401
# {"success":false,"error":{"type":"invalidLinkedApiToken","message":"The provided 'linked-api-token' is invalid."}}A network failure throws it with the type httpError. See Handling results.
Errors any request can return
These errors do not depend on the endpoint: they come from checks every request goes through – authorization and the request rate. Admin API requests do not use the identification-token, so the two errors about it never apply there.
| Type | HTTP status | Cause | What to do |
|---|---|---|---|
linkedApiTokenRequired | 401 | The linked-api-token header is missing. | Add the header – see Authorization. |
invalidLinkedApiToken | 401 | The linked-api-token value matches no token. | Copy the token again from the platform. |
identificationTokenRequired | 401 | The identification-token header is missing. | Add the token of the LinkedIn account the request is for. |
invalidIdentificationToken | 401 | The identification-token value matches no LinkedIn account, or the account has been deleted. | Copy the account token again from the platform. |
tooManyRequests | 429 | More than 100 requests to one endpoint within 60 seconds with one linked-api-token, across all its LinkedIn accounts. Checking a workflow result with GET /workflows/{workflowId} allows 600. | Wait and retry. Spread requests over time instead of sending them in bursts. |
unexpectedError | 400 | The request failed on the Linked API side. | Retry. If the error repeats, contact support. |
The message of each of these errors is fixed text:
| Type | message |
|---|---|
linkedApiTokenRequired | 'linked-api-token' is missing in request headers. |
invalidLinkedApiToken | The provided 'linked-api-token' is invalid. |
identificationTokenRequired | 'identification-token' is missing in request headers. |
invalidIdentificationToken | The provided 'identification-token' is invalid. |
tooManyRequests | Too many requests. Please try again later. |
unexpectedError | Unexpected error: – the same for every such failure, without details |
Errors described elsewhere
Errors that belong to one part of the API are described next to it:
- Starting a workflow – an invalid workflow, a missing subscription or Plus seat, a signed-out account, working hours: Executing Workflows.
- Actions inside a workflow – errors an action reports in its result: Actions Overview and each action page.
- Signals (coming soon) – Managing Signals.
- Webhooks – each method of Managing Webhooks.
- Admin API – Admin API Overview.