Message Attachment Download
curl --request GET \
--url https://api.aisa.one/apis/v1/unipile/linkedin/messages/{message_id}/attachments/{attachment_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aisa.one/apis/v1/unipile/linkedin/messages/{message_id}/attachments/{attachment_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.aisa.one/apis/v1/unipile/linkedin/messages/{message_id}/attachments/{attachment_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aisa.one/apis/v1/unipile/linkedin/messages/{message_id}/attachments/{attachment_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/unipile/linkedin/messages/{message_id}/attachments/{attachment_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.aisa.one/apis/v1/unipile/linkedin/messages/{message_id}/attachments/{attachment_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/unipile/linkedin/messages/{message_id}/attachments/{attachment_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body"<string>"消息
Message Attachment Download
下载 LinkedIn 消息中的文件附件。
GET
https://api.aisa.one
/
apis
/
v1
/
unipile
/
linkedin
/
messages
/
{message_id}
/
attachments
/
{attachment_id}
Message Attachment Download
curl --request GET \
--url https://api.aisa.one/apis/v1/unipile/linkedin/messages/{message_id}/attachments/{attachment_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aisa.one/apis/v1/unipile/linkedin/messages/{message_id}/attachments/{attachment_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.aisa.one/apis/v1/unipile/linkedin/messages/{message_id}/attachments/{attachment_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aisa.one/apis/v1/unipile/linkedin/messages/{message_id}/attachments/{attachment_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/unipile/linkedin/messages/{message_id}/attachments/{attachment_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.aisa.one/apis/v1/unipile/linkedin/messages/{message_id}/attachments/{attachment_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/unipile/linkedin/messages/{message_id}/attachments/{attachment_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body"<string>"以二进制流返回消息附件内容。
message_id 与 attachment_id 取自 Chat Messages 返回的消息对象内 attachments[] 数组。
当前价格请查看费用说明;支持报价的接口可按实际请求获取报价。
请求规范
- 方法与路径: GET /apis/v1/unipile/linkedin/messages/{message_id}/attachments/{attachment_id}
- 可用状态: enabled
- 请求 URL 模板:
https://api.aisa.one/apis/v1/unipile/linkedin/messages/{message_id}/attachments/{attachment_id} - attachment_id: path; 必填
- message_id: path; 必填
{
"operationId": "get_unipile_linkedin_attachment",
"method": "GET",
"path": "/apis/v1/unipile/linkedin/messages/{message_id}/attachments/{attachment_id}",
"servers": [
{
"url": "https://api.aisa.one"
}
],
"parameters": [
{
"description": "The id of the wanted attachment.",
"in": "path",
"name": "attachment_id",
"required": true,
"schema": {
"type": "string"
}
},
{
"description": "The id of the message to which the attachment is linked.",
"in": "path",
"name": "message_id",
"required": true,
"schema": {
"type": "string"
}
}
],
"security": [
{
"bearerAuth": []
}
],
"x-aisa-status": "enabled",
"components": {
"securitySchemes": {
"bearerAuth": {
"scheme": "bearer",
"type": "http"
}
}
}
}
费用与请求规则
公开参考价格:每次成功请求 $0.005 USD。 账户适用价格可能不同;支持报价的接口可按实际请求获取报价。授权
路径参数
响应
OK. Request succeeded.
The response is of type file.