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>'
ParamMặc địnhMô tả
limit5Số 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#

FieldMô tả
idID task
request_idID request cha
type_requestLoại flow — luôn register cho phase tạo tài khoản (phân biệt với phase post)
domainNền tảng podcast (anchor.fm, spotify.com, buzzsprout.com…)
websiteWebsite khách hàng
email / usernameEmail / username register
pass_mailMật khẩu Gmail
twofaBase32 secret TOTP
app_passwordApp password Gmail
passwordMật khẩu tạo sẵn (12 ký tự: viết Hoa đầu + chữ thường + số + ký tự đặc biệt)
aboutMô tả kênh
image_urlẢnh avatar/cover kênh
link_rssURL 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_idUUID group của request — worker có thể dùng để nhóm/cluster accounts cùng batch
targetTổ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 runningcompleted.

Trạng thái trướcTrạng thái sau
runningcompleted
# 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"
  }'
FieldBắt buộcMô 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.
noteGhi chú

Response#

{ "success": true }

5. Báo thất bại #

Task chuyển runningfailed. Retry manager sẽ tự động re-queue nếu retry_count < max_retries; hết retry → final_failed.

Trạng thái trướcTrạng thái sau
runningfailed (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"}'
FieldBắt buộcMô tả
error_messageMô tả ngắn lỗi (≤1000 ký tự)
noteGhi chú

Response#

{ "success": true }