[Step 2/5] Upload and set article cover image (optional)
Step 2 of 5 (optional) — Upload a cover image and attach it to the draft.
article_id: obtained from Step 1cover_image: anhttps://URL or a local file path
This step can be skipped if you don’t need a cover image.
API 참조로 돌아가기
/Article Endpoints
PUT
/x/articles/{article_id}/coverAPI 인증
AuthorizationBearer token · header필수TwexAPI 전역 인증 토큰 (Bearer Token). 헤더에 포함되어야 합니다: Authorization: Bearer <YOUR_TWEXAPI_KEY>.
경로 매개변수
article_idstring필수요청 본문
필수application/jsoncookiestring필수사용자가 직접 승인한 Twitter 세션 자격 증명 또는 auth_token (BYOC — Bring Your Own Cookie). 자격 증명은 저장되지 않으며 무상태 프록시로만 실행됩니다. 자세한 내용은 [인증 및 보안 안내](/ko/authentication#write-operations--byoc-bring-your-own-cookie) 및 [쿠키 확인 방법](https://youtube-promotion.pages.dev/how-to-get-twitter-cookie)을 참조하세요.
cover_imagestring필수Cover image: https URL or local file path
응답
200요청 성공 응답
codeinteger필수HTTP 상태 코드 (200은 성공)
msgstring필수응답 메시지 (예: 'success')
dataArticleCoverData | any엔드포인트가 반환한 핵심 데이터
속성 표시속성 숨기기
Any of:
ArticleCoverData
media_idstring필수Media ID of the uploaded cover image on X
any
any422요청 매개변수 유효성 검사 오류
detailValidationError[]속성 표시속성 숨기기
Array of
ValidationErrorlocstring | integer[]필수속성 표시속성 숨기기
Array of
string | integerAny of:
string
stringinteger
integermsgstring필수응답 메시지 (예: 'success')
typestring필수inputanyctxobject429Daily tweet limit reached
500Server error
⚡대화형 콘솔PUT
⚡대화형 콘솔 / API 테스트PUTLive Console
🌐대상 서버:
https://api.twexapi.io● 프로덕션 준비 완료
✍️
쓰기 작업 인증 정보 가이드 (TwexAPI 키 + Twitter 쿠키)
1. TwexAPI 플랫폼 키 (Bearer Token): 요청 과금 및 인증을 위해 아래 "API 인증"에 입력하세요.
2. Twitter 계정 쿠키: 트윗, 좋아요, 팔로우 등 쓰기 작업을 위해 아래 요청 본문의 cookie 필드에 쿠키(예: auth_token=...; ct0=...)를 입력하세요.
🔑API 인증
⚙️요청 파라미터 (1)
📝요청 본문application/json
📡
暂无响应数据
请在「请求配置」中确认参数后,点击底部的「发送请求」按钮。
요청 예시
curl -X PUT "https://api.twexapi.io/x/articles/string/cover" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"cookie": "string",
"cover_image": "string"
}'const response = await fetch("https://api.twexapi.io/x/articles/string/cover", {
method: "PUT",
headers: {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"cookie": "string",
"cover_image": "string"
})
});import requests
response = requests.put(
"https://api.twexapi.io/x/articles/string/cover",
headers={
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
json={
"cookie": "string",
"cover_image": "string"
},
)응답 예시
{
"code": 0,
"msg": "string",
"data": {
"media_id": "string"
}
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}{
"code": 429,
"msg": "Daily tweet limit reached, please try again tomorrow."
}{
"code": 500,
"msg": "Internal server error"
}