Podcast — Account#
Worker tạo tài khoản trên nền tảng podcast, trả credentials để dùng cho luồng Post sau này.
Base URL: https://manager.likepion.com/api/v1/podcast_account
1. Lấy danh sách task #
Podcast site chính (creators.spotify.com…) cần tạo trước để có RSS feed, sau đó các site phụ import lại. Server tự sắp xếp thứ tự — worker chỉ cần gọi 1 API duy nhất, lặp đến khi không còn task.
curl -X GET 'https://manager.likepion.com/api/v1/podcast_account/links?limit=5' \
-H 'X-API-Key: <api_key>'| Param | Mặc định | Mô tả |
|---|---|---|
limit | 5 | Số task (tối đa 1000) |
Response#
{
"success": true,
"data": [
{
"id": "uuid",
"request_id": "uuid",
"type_request": "register",
"domain": "anchor.fm",
"website": "https://likepion.com",
"email": "pod@seed.com",
"username": "poduser",
"pass_mail": "xxxx xxxx xxxx xxxx",
"twofa": "JBSWY3DPEHPK3PXP",
"app_password": "xxxx xxxx xxxx xxxx",
"password": "Abc123!@xyzQ",
"about": "<p>Kênh podcast chia sẻ kiến thức SEO...</p>",
"image_url": "https://s3.likepion.com/avatars/pod.jpg",
"link_rss": "https://anchor.fm/s/xxxxx/podcast/rss",
"group_id": "09303c92-ae51-4358-b82b-41257f939146",
"target": 10
}
]
}Fields#
| Field | Mô tả |
|---|---|
id | ID task |
request_id | ID request cha |
type_request | Loại flow — luôn register cho phase tạo tài khoản (phân biệt với phase post) |
domain | Nền tảng podcast (anchor.fm, spotify.com, buzzsprout.com…) |
website | Website khách hàng |
email / username | Email / username register |
pass_mail | Mật khẩu Gmail |
twofa | Base32 secret TOTP |
app_password | App password Gmail |
password | Mật khẩu tạo sẵn (12 ký tự: viết Hoa đầu + chữ thường + số + ký tự đặc biệt) |
about | Mô tả kênh |
image_url | Ảnh avatar/cover kênh |
link_rss | URL RSS feed của site chính — chỉ hiện với task site phụ (rỗng với task site chính). Worker dùng để import feed. |
group_id | UUID group của request — worker có thể dùng để nhóm/cluster accounts cùng batch |
target | Tổng số tài khoản cần tạo cho request cha (podcast_register.target) |
2. Lấy chi tiết task #
Lấy thông tin 1 task cụ thể theo id. Không cần filter server/status. Không thay đổi DB.
curl -X GET 'https://manager.likepion.com/api/v1/podcast_account/links/TASK_ID' \
-H 'X-API-Key: <api_key>'Response#
Trả về 1 object (không bọc trong mảng) — schema giống bước 1.
{ "success": true, "data": { ...task fields... } }Nếu task không tồn tại hoặc đã soft-delete → HTTP 404 {"success": false, "message": "task not found"}.
3. Báo đang xử lý #
Sau khi pull task, bắt buộc gọi API này để chuyển task sang trạng thái running. Assign tự set started_at = NOW() (idempotent — gọi lại nhiều lần không đổi).
curl -X POST 'https://manager.likepion.com/api/v1/podcast_account/links/<task_id>/start' \
-H 'X-API-Key: <api_key>'Response#
{ "success": true }4. Báo hoàn thành #
Task chuyển running → completed.
| Trạng thái trước | Trạng thái sau |
|---|---|
running | completed |
# Site chính — kèm link_rss (RSS feed URL, bắt buộc cho phase B)
curl -X POST 'https://manager.likepion.com/api/v1/podcast_account/links/<task_id>/complete' \
-H 'X-API-Key: <api_key>' \
-H 'Content-Type: application/json' \
-d '{
"email": "pod.real@anchor.fm",
"username": "realpoduser",
"password": "realPwd!",
"cookie": "session=abc123",
"link_rss": "https://anchor.fm/s/xxxxx/podcast/rss"
}'
# Site phụ — không cần link_rss, chỉ cần credentials
curl -X POST 'https://manager.likepion.com/api/v1/podcast_account/links/<task_id>/complete' \
-H 'X-API-Key: <api_key>' \
-H 'Content-Type: application/json' \
-d '{
"email": "pod.subsite@...",
"username": "subuser",
"password": "pw",
"cookie": "sid=yyy"
}'| Field | Bắt buộc | Mô tả |
|---|---|---|
email / username / password / cookie | ✔ | Ít nhất 1 field credentials thực |
link_rss | ✔ (site chính) | URL RSS feed — gửi khi tạo xong account site chính. Site phụ sẽ nhận lại qua field link_rss trong payload ở lần pull tiếp để import feed. |
note | Ghi chú |
Response#
{ "success": true }5. Báo thất bại #
Task chuyển running → failed. Retry manager sẽ tự động re-queue nếu retry_count < max_retries; hết retry → final_failed.
| Trạng thái trước | Trạng thái sau |
|---|---|
running | failed (retry) → final_failed (hết retry) |
curl -X POST 'https://manager.likepion.com/api/v1/podcast_account/links/<task_id>/fail' \
-H 'X-API-Key: <api_key>' \
-H 'Content-Type: application/json' \
-d '{"error_message": "email already registered"}'| Field | Bắt buộc | Mô tả |
|---|---|---|
error_message | ✔ | Mô tả ngắn lỗi (≤1000 ký tự) |
note | Ghi chú |
Response#
{ "success": true }