APILinkedIn Messaging
Download media from message
Download media (images, files, videos, audio) from a LinkedIn messaging URL. Uses account session cookies for authentication. No proxy is used — media is fetched directly from LinkedIn CDN. Supports URLs from www.linkedin.com/dms/prv/ (private messaging media) and media.licdn.com (CDN-hosted media).
POST
/conversations/download-mediaAuthentication requiredConversations
Code Examples
curl -X POST 'https://api.connectsafely.ai/linkedin/conversations/download-media' \ -H 'Authorization: Bearer <your_api_key>' \ -H 'Content-Type: application/json' \ -d '{"accountId":"acc_12345","url":"https://linkedin.com/in/example"}'Parameters
No parameters.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
accountId | string | Yes | LinkedIn account ID |
url | string | Yes | Media URL from message attachment (www.linkedin.com or media.licdn.com) |
Example
{
"accountId": "acc_12345",
"url": "https://linkedin.com/in/example"
}Responses
| Status | Description |
|---|---|
| 200 | Media file binary |
| 400 | Invalid media URL host |
| 401 | Unauthorized |
| 404 | Account not found |
| 500 | Server error |
400 Response Parameters
| Name | Type | Description |
|---|---|---|
error | string |
400 Example
{
"error": "example_value"
}401 Response Parameters
| Name | Type | Description |
|---|---|---|
error | string |
401 Example
{
"error": "example_value"
}404 Response Parameters
| Name | Type | Description |
|---|---|---|
error | string |
404 Example
{
"error": "example_value"
}500 Response Parameters
| Name | Type | Description |
|---|---|---|
error | string |
500 Example
{
"error": "example_value"
}