---
title: "Bilibili Video được người dùng đăng tải API (V2)"
description: "Lấy lại video được đăng bởi người dùng Bilibili được xác định bởi UID, với tùy chọn tiếp tục từ phản hồi trước đó. Sử dụng để xem qua các tệp đăng của người tạo hoặc tiếp tục qua danh sách video của họ."
lastUpdated: false
aiUsagePrompt: true
---

# Bilibili Video được người dùng đăng tải API \(V2\)

<ApiTester
  method="GET"
  :path='JSON.parse("\"/api/bilibili/get-user-video-list/v2\"")'
  :summary='JSON.parse("\"Video được người dùng đăng tải (V2)\"")'
  openapiDefinitionUrl="https://docs.justoneapi.com/openapi/bilibili/user-published-videos-v2-vi.json"
  openapiVersion="3.1.0"
  :parameters='JSON.parse("[{\"name\":\"token\",\"in\":\"query\",\"description\":\"Token để truy cập API.\",\"required\":true,\"schema\":{\"type\":\"string\"}},{\"name\":\"uid\",\"in\":\"query\",\"description\":\"ID người dùng trên Bilibili (UID).\",\"required\":true,\"schema\":{\"type\":\"string\"}},{\"name\":\"param\",\"in\":\"query\",\"description\":\"Tham số định dạng trang từ phản hồi trước.\",\"required\":false,\"schema\":{\"type\":\"string\"}}]")'
  :requestBody='JSON.parse("null")'
  :responses='JSON.parse("{\"200\":{\"description\":\"OK\",\"content\":{\"application/json\":{\"schema\":{\"if\":{\"properties\":{\"code\":{\"const\":0}},\"required\":[\"code\"]},\"then\":{\"properties\":{\"data\":{\"type\":\"object\",\"description\":\"Phản hồi của Bilibili về video đã được công bố của tài khoản yêu cầu.\",\"properties\":{\"code\":{\"type\":\"integer\",\"description\":\"Mã trạng thái được báo cáo bởi Bilibili trong dữ liệu phản hồi.\"},\"message\":{\"type\":\"string\",\"description\":\"Thông báo trạng thái được báo cáo bởi Bilibili trong dữ liệu phản hồi.\"},\"ttl\":{\"type\":\"integer\",\"description\":\"Giá trị TTL được báo cáo trong phản hồi của Bilibili.\"},\"data\":{\"type\":\"object\",\"description\":\"Video đã được công bố và thông tin phân trang cho tài khoản.\",\"properties\":{\"count\":{\"type\":\"integer\",\"description\":\"Số tổng số video đã được công bố cho tài khoản.\"},\"item\":{\"type\":[\"array\",\"null\"],\"description\":\"Các video đã được công bố trên trang này. Trường này có thể là null khi không có video được trả về.\",\"items\":{\"type\":\"object\",\"description\":\"Một video đã được công bố từ tài khoản.\",\"properties\":{\"bvid\":{\"type\":\"string\",\"description\":\"ID video của Bilibili dưới dạng BV.\"},\"title\":{\"type\":\"string\",\"description\":\"Tiêu đề video gốc.\"},\"translated_title\":{\"type\":\"string\",\"description\":\"Tiêu đề video được dịch, nếu có.\"},\"translate_status\":{\"type\":\"string\",\"description\":\"Trạng thái dịch được báo cáo cho tiêu đề.\"},\"subtitle\":{\"type\":\"string\",\"description\":\"Nội dung phụ được hiển thị cho mục video.\"},\"author\":{\"type\":\"string\",\"description\":\"Tên tác giả được báo cáo cùng với video.\"},\"tname\":{\"type\":\"string\",\"description\":\"Tên danh mục video.\"},\"param\":{\"type\":\"string\",\"description\":\"Định danh của mục video, trả về dưới dạng văn bản.\"},\"goto\":{\"type\":\"string\",\"description\":\"Loại nguồn được báo cáo cho mục video.\"},\"cover\":{\"type\":\"string\",\"description\":\"URL hình nền video.\"},\"ctime\":{\"type\":\"integer\",\"description\":\"Thời điểm công bố dưới dạng giây kể từ thời kỳ Unix.\"},\"publish_time_text\":{\"type\":\"string\",\"description\":\"Thời gian xuất bản dưới dạng văn bản hiển thị.\"},\"duration\":{\"type\":\"integer\",\"description\":\"Thời lượng video tính bằng giây.\"},\"length\":{\"type\":\"string\",\"description\":\"Văn bản định dạng thời gian, có thể trống. Sử dụng thời gian để chỉ thời lượng dưới dạng số giây.\"},\"videos\":{\"type\":\"integer\",\"description\":\"Số phần được báo cáo cho video.\"},\"first_cid\":{\"type\":\"integer\",\"description\":\"ID nội dung của phần video đầu tiên.\"},\"play\":{\"type\":\"integer\",\"description\":\"Số lần xem được báo cáo cho video.\"},\"danmaku\":{\"type\":\"integer\",\"description\":\"Số lượng bình luận danmaku được báo cáo cho video.\"},\"is_popular\":{\"type\":\"boolean\",\"description\":\"Chỉ thị xem video có được đánh dấu là phổ biến hay không.\"},\"is_steins\":{\"type\":\"boolean\",\"description\":\"Chỉ thị xem video có được đánh dấu là tương tác hay không.\"},\"is_ugcpay\":{\"type\":\"boolean\",\"description\":\"Dấu hiệu thanh toán UGC được báo cáo cho video.\"},\"ugc_pay\":{\"type\":\"integer\",\"description\":\"Mã thanh toán UGC được báo cáo cho video.\"},\"is_cooperation\":{\"type\":\"boolean\",\"description\":\"Chỉ thị xem video có được đánh dấu là sự hợp tác hay không.\"},\"is_pgc\":{\"type\":\"boolean\",\"description\":\"Dấu hiệu PGC được báo cáo cho video.\"},\"is_live_playback\":{\"type\":\"boolean\",\"description\":\"Chỉ thị xem video có được đánh dấu là phát lại trực tiếp hay không.\"},\"is_pugv\":{\"type\":\"boolean\",\"description\":\"Dấu hiệu PUGV được báo cáo cho video.\"},\"badges\":{\"type\":\"array\",\"description\":\"Hiển thị huy hiệu liên quan đến video.\",\"items\":{\"type\":\"object\",\"description\":\"Một huy hiệu được hiển thị trên video.\",\"properties\":{\"text\":{\"type\":\"string\",\"description\":\"Văn bản được hiển thị trong huy hiệu video.\"}}}}}}},\"has_next\":{\"type\":\"boolean\",\"description\":\"Liệu Bilibili có báo cáo trang tiếp theo hay không. Con trỏ có thể bị bỏ qua nếu giá trị này là đúng.\"},\"has_prev\":{\"type\":\"boolean\",\"description\":\"Liệu Bilibili có báo cáo trang trước hay không.\"},\"next_cursor\":{\"type\":\"string\",\"description\":\"Nếu có và không rỗng, truyền con trỏ này không thay đổi như tham số với cùng uid để yêu cầu trang tiếp theo.\"}}}}}}},\"allOf\":[{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}]}}}},\"400\":{\"description\":\"Các tham số hoặc nội dung yêu cầu không hợp lệ.\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}}}},\"401\":{\"description\":\"Tài khoản truy cập không hợp lệ hoặc không hoạt động.\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}}}},\"403\":{\"description\":\"Quyền truy cập bị từ chối.\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}}}},\"429\":{\"description\":\"Tốc độ yêu cầu hoặc giới hạn hàng ngày đã vượt quá.\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}}}},\"500\":{\"description\":\"Lỗi máy chủ nội bộ.\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}}}},\"503\":{\"description\":\"Dịch vụ tạm thời không khả dụng.\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}}}}}")'
  :servers='JSON.parse("[{\"url\":\"https://api.justoneapi.com\",\"description\":\"API sản xuất toàn cục (mặc định)\"}]")'
  :security='JSON.parse("[]")'
  :securitySchemes='JSON.parse("{}")'
  :schemas='JSON.parse("{}")'
/>

<ApiHealthSection :api='JSON.parse("\"/api/bilibili/get-user-video-list/v2\"")' />

<p>Lấy lại video được đăng bởi người dùng Bilibili được xác định bởi UID, với tùy chọn tiếp tục từ phản hồi trước đó. Sử dụng để xem qua các tệp đăng của người tạo hoặc tiếp tục qua danh sách video của họ.</p>

## Tham số

<div class="api-doc-table api-doc-table--params">

| Tên | Vị trí | Kiểu dữ liệu | Bắt buộc | Mặc định | Mô tả |
| --- | --- | --- | --- | --- | --- |
| <code>token</code> | query | <code>string</code> | Đúng | - | Token để truy cập API. |
| <code>uid</code> | query | <code>string</code> | Đúng | - | ID người dùng trên Bilibili (UID). |
| <code>param</code> | query | <code>string</code> | Không | - | Tham số định dạng trang từ phản hồi trước. |

</div>

## Ví dụ mã hóa

::: code-group

```bash [🐚 cURL]
curl --max-time 120 -X GET 'https://api.justoneapi.com/api/bilibili/get-user-video-list/v2?token=YOUR_API_KEY&uid=VALUE'
```

```text [🤖 Lời hướng dẫn AI]
Tôi muốn sử dụng API "Video được người dùng đăng tải (V2)" từ JustOneAPI.
URL cơ sở: https://api.justoneapi.com.
Đường dẫn API: /api/bilibili/get-user-video-list/v2?token=YOUR_API_KEY&uid=VALUE
Điểm cuối API: BASE_URL + /api/bilibili/get-user-video-list/v2?token=YOUR_API_KEY&uid=VALUE
Phương thức HTTP: GET
Xác thực: Thêm tham số "token" vào URL.
Định nghĩa OpenAPI: https://docs.justoneapi.com/openapi/bilibili/user-published-videos-v2-vi.json

Tham số:
- token (query): Token để truy cập API. (Bắt buộc)
- uid (query): ID người dùng trên Bilibili (UID). (Bắt buộc)
- param (query): Tham số định dạng trang từ phản hồi trước.

Định dạng trả về: Xử lý an toàn phản hồi JSON hoặc văn bản dựa trên Content-Type thực tế.

Xử lý phản hồi và mã lỗi:
1. Đọc kết quả xử lý từ trường "code" trong nội dung phản hồi (mã 0 là thành công).
2. Thời gian chờ đề xuất: 120 giây. Nếu 120 giây quá dài, hãy dành ít nhất 60 giây. Một số yêu cầu có thể hết thời gian chờ trước khi có kết quả.
3. Mã kết quả:
   - 0: Thành công
   - 100: Token không hợp lệ hoặc đã bị vô hiệu hóa
   - 301: Không lấy được dữ liệu. Hãy thử lại.
   - 302: Vượt giới hạn tần suất gọi
   - 303: Vượt hạn mức trong ngày
   - 400: Tham số không hợp lệ
   - 500: Lỗi nội bộ máy chủ
   - 600: Không có quyền truy cập
   - 601: Không đủ số dư
   - 602: Đã chạm giới hạn ngân sách token
4. Mã 601 nghĩa là số dư dùng chung của tài khoản không đủ. Mã 602 nghĩa là token API đã chạm giới hạn ngân sách tích lũy riêng. Việc đặt ngân sách cho token không chuyển tiền khỏi số dư dùng chung.

Xin hãy giúp tôi viết một script bằng ngôn ngữ lập trình yêu thích để gọi API này và xử lý phản hồi.
```

```python [🐍 Python]
import requests

BASE_URL = "https://api.justoneapi.com"  # Được cung cấp bởi các server OpenAPI

url = BASE_URL + "/api/bilibili/get-user-video-list/v2?token=YOUR_API_KEY&uid=VALUE"
response = requests.get(url, timeout=120)
print(response.status_code)
if response.content:
    content_type = response.headers.get("content-type", "").lower()
    if "json" in content_type:
        try:
            print(response.json())
        except ValueError:
            print(response.text)
    elif content_type.startswith("text/") or "xml" in content_type or content_type.split(";", 1)[0].strip() in {"application/javascript", "application/x-www-form-urlencoded", "application/graphql"}:
        print(response.text)
    else:
        with open("response.bin", "wb") as output:
            output.write(response.content)
        print(f"Saved {len(response.content)} bytes to response.bin")
```

```js [🌐 JavaScript]
const BASE_URL = "https://api.justoneapi.com"; // Được cung cấp bởi các server OpenAPI
const url = BASE_URL + "/api/bilibili/get-user-video-list/v2?token=YOUR_API_KEY&uid=VALUE";

const response = await fetch(url, {
  method: "GET",
  signal: AbortSignal.timeout(120000)
});
console.log(response.status);
const responseBytes = await response.arrayBuffer();
if (responseBytes.byteLength) {
  const contentType = (response.headers.get("content-type") || "").toLowerCase();
  const mediaType = contentType.split(";", 1)[0].trim();
  const textual = contentType.startsWith("text/") || contentType.includes("json") || contentType.includes("xml") || ["application/javascript", "application/x-www-form-urlencoded", "application/graphql"].includes(mediaType);
  if (textual) {
    const responseText = new TextDecoder().decode(responseBytes);
    let data = responseText;
    if (contentType.includes("json")) {
      try { data = JSON.parse(responseText); } catch { /* Keep the raw body. */ }
    }
    console.log(data);
  } else {
    console.log(`Received ${responseBytes.byteLength} binary bytes`);
  }
}
```

```java [☕ Java]
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.time.Duration;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;

public class Main {
    public static void main(String[] args) throws Exception {
        final String BASE_URL = "https://api.justoneapi.com"; // Được cung cấp bởi các server OpenAPI
        final String url = BASE_URL + "/api/bilibili/get-user-video-list/v2?token=YOUR_API_KEY&uid=VALUE";

        HttpClient client = HttpClient.newBuilder().connectTimeout(Duration.ofSeconds(120)).build();
        HttpRequest.Builder builder = HttpRequest.newBuilder()
            .uri(URI.create(url))
            .timeout(Duration.ofSeconds(120))
            .method("GET", HttpRequest.BodyPublishers.noBody());

        HttpRequest request = builder.build();

        HttpResponse<byte[]> response = client.send(request, HttpResponse.BodyHandlers.ofByteArray());
        System.out.println(response.statusCode());
        String contentType = response.headers().firstValue("content-type").orElse("").toLowerCase();
        String mediaType = contentType.split(";", 2)[0].trim();
        if (contentType.startsWith("text/") || contentType.contains("json") || contentType.contains("xml") || mediaType.equals("application/javascript") || mediaType.equals("application/x-www-form-urlencoded") || mediaType.equals("application/graphql")) {
            System.out.println(new String(response.body(), StandardCharsets.UTF_8));
        } else {
            Files.write(Path.of("response.bin"), response.body());
            System.out.println("Saved " + response.body().length + " bytes to response.bin");
        }
    }
}
```

```go [🐹 Go]
package main

import (
	"fmt"
	"io"
	"os"
	"strings"
	"net/http"
	"time"
)

const BASE_URL = "https://api.justoneapi.com" // Được cung cấp bởi các server OpenAPI

func main() {
	client := &http.Client{Timeout: 120 * time.Second}
	url := BASE_URL + "/api/bilibili/get-user-video-list/v2?token=YOUR_API_KEY&uid=VALUE"
	req, _ := http.NewRequest("GET", url, nil)
	resp, _ := client.Do(req)
	defer resp.Body.Close()
	fmt.Println(resp.StatusCode)
	bodyBytes, _ := io.ReadAll(resp.Body)
	contentType := strings.ToLower(resp.Header.Get("Content-Type"))
	mediaType := strings.TrimSpace(strings.SplitN(contentType, ";", 2)[0])
	if strings.HasPrefix(contentType, "text/") || strings.Contains(contentType, "json") || strings.Contains(contentType, "xml") || mediaType == "application/javascript" || mediaType == "application/x-www-form-urlencoded" || mediaType == "application/graphql" {
		fmt.Println(string(bodyBytes))
	} else {
		os.WriteFile("response.bin", bodyBytes, 0600)
		fmt.Printf("Saved %d bytes to response.bin\n", len(bodyBytes))
	}
}
```

```php [🐘 PHP]
<?php
$BASE_URL = 'https://api.justoneapi.com'; // Được cung cấp bởi các server OpenAPI
$url = $BASE_URL . '/api/bilibili/get-user-video-list/v2?token=YOUR_API_KEY&uid=VALUE';

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 120);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
$contentType = strtolower((string) curl_getinfo($ch, CURLINFO_CONTENT_TYPE));
curl_close($ch);
echo $status . PHP_EOL;
$mediaType = trim(explode(';', $contentType, 2)[0]);
if (str_starts_with($contentType, 'text/') || str_contains($contentType, 'json') || str_contains($contentType, 'xml') || in_array($mediaType, ['application/javascript', 'application/x-www-form-urlencoded', 'application/graphql'], true)) {
    echo $response;
} else {
    file_put_contents('response.bin', $response);
    echo 'Saved ' . strlen($response) . ' bytes to response.bin' . PHP_EOL;
}
```

:::

<div style="text-align: right; margin-top: -20px; margin-bottom: 20px;">
<a href="/openapi/bilibili/user-published-videos-v2-vi.json" target="_blank" style="font-size: 12px; color: var(--vp-c-text-3); text-decoration: none; opacity: 0.8;">[Định nghĩa OpenAPI (JSON)]</a>
</div>

## Các trường trong phản hồi

Các trường chính trong phản hồi thành công (`code = 0`).

<div class="api-doc-table api-doc-table--response">

| Đường dẫn trường | Kiểu dữ liệu | Mô tả |
| --- | --- | --- |
| <code>data</code> | <code>object</code> | Phản hồi của Bilibili về video đã được công bố của tài khoản yêu cầu. |
| <code>data.code</code> | <code>integer</code> | Mã trạng thái được báo cáo bởi Bilibili trong dữ liệu phản hồi. |
| <code>data.message</code> | <code>string</code> | Thông báo trạng thái được báo cáo bởi Bilibili trong dữ liệu phản hồi. |
| <code>data.ttl</code> | <code>integer</code> | Giá trị TTL được báo cáo trong phản hồi của Bilibili. |
| <code>data.data</code> | <code>object</code> | Video đã được công bố và thông tin phân trang cho tài khoản. |
| <code>data.data.count</code> | <code>integer</code> | Số tổng số video đã được công bố cho tài khoản. |
| <code>data.data.item</code> | <code>array &#124; null</code> | Các video đã được công bố trên trang này. Trường này có thể là null khi không có video được trả về. |
| <code>data.data.item[]</code> | <code>object</code> | Một video đã được công bố từ tài khoản. |
| <code>data.data.item[].bvid</code> | <code>string</code> | ID video của Bilibili dưới dạng BV. |
| <code>data.data.item[].title</code> | <code>string</code> | Tiêu đề video gốc. |
| <code>data.data.item[].translated_title</code> | <code>string</code> | Tiêu đề video được dịch, nếu có. |
| <code>data.data.item[].translate_status</code> | <code>string</code> | Trạng thái dịch được báo cáo cho tiêu đề. |
| <code>data.data.item[].subtitle</code> | <code>string</code> | Nội dung phụ được hiển thị cho mục video. |
| <code>data.data.item[].author</code> | <code>string</code> | Tên tác giả được báo cáo cùng với video. |
| <code>data.data.item[].tname</code> | <code>string</code> | Tên danh mục video. |
| <code>data.data.item[].param</code> | <code>string</code> | Định danh của mục video, trả về dưới dạng văn bản. |
| <code>data.data.item[].goto</code> | <code>string</code> | Loại nguồn được báo cáo cho mục video. |
| <code>data.data.item[].cover</code> | <code>string</code> | URL hình nền video. |
| <code>data.data.item[].ctime</code> | <code>integer</code> | Thời điểm công bố dưới dạng giây kể từ thời kỳ Unix. |
| <code>data.data.item[].publish_time_text</code> | <code>string</code> | Thời gian xuất bản dưới dạng văn bản hiển thị. |
| <code>data.data.item[].duration</code> | <code>integer</code> | Thời lượng video tính bằng giây. |
| <code>data.data.item[].length</code> | <code>string</code> | Văn bản định dạng thời gian, có thể trống. Sử dụng thời gian để chỉ thời lượng dưới dạng số giây. |
| <code>data.data.item[].videos</code> | <code>integer</code> | Số phần được báo cáo cho video. |
| <code>data.data.item[].first_cid</code> | <code>integer</code> | ID nội dung của phần video đầu tiên. |
| <code>data.data.item[].play</code> | <code>integer</code> | Số lần xem được báo cáo cho video. |
| <code>data.data.item[].danmaku</code> | <code>integer</code> | Số lượng bình luận danmaku được báo cáo cho video. |
| <code>data.data.item[].is_popular</code> | <code>boolean</code> | Chỉ thị xem video có được đánh dấu là phổ biến hay không. |
| <code>data.data.item[].is_steins</code> | <code>boolean</code> | Chỉ thị xem video có được đánh dấu là tương tác hay không. |
| <code>data.data.item[].is_ugcpay</code> | <code>boolean</code> | Dấu hiệu thanh toán UGC được báo cáo cho video. |
| <code>data.data.item[].ugc_pay</code> | <code>integer</code> | Mã thanh toán UGC được báo cáo cho video. |
| <code>data.data.item[].is_cooperation</code> | <code>boolean</code> | Chỉ thị xem video có được đánh dấu là sự hợp tác hay không. |
| <code>data.data.item[].is_pgc</code> | <code>boolean</code> | Dấu hiệu PGC được báo cáo cho video. |
| <code>data.data.item[].is_live_playback</code> | <code>boolean</code> | Chỉ thị xem video có được đánh dấu là phát lại trực tiếp hay không. |
| <code>data.data.item[].is_pugv</code> | <code>boolean</code> | Dấu hiệu PUGV được báo cáo cho video. |
| <code>data.data.item[].badges</code> | <code>array</code> | Hiển thị huy hiệu liên quan đến video. |
| <code>data.data.item[].badges[]</code> | <code>object</code> | Một huy hiệu được hiển thị trên video. |
| <code>data.data.item[].badges[].text</code> | <code>string</code> | Văn bản được hiển thị trong huy hiệu video. |
| <code>data.data.has_next</code> | <code>boolean</code> | Liệu Bilibili có báo cáo trang tiếp theo hay không. Con trỏ có thể bị bỏ qua nếu giá trị này là đúng. |
| <code>data.data.has_prev</code> | <code>boolean</code> | Liệu Bilibili có báo cáo trang trước hay không. |
| <code>data.data.next_cursor</code> | <code>string</code> | Nếu có và không rỗng, truyền con trỏ này không thay đổi như tham số với cùng uid để yêu cầu trang tiếp theo. |

</div>

## Ví dụ phản hồi

<ApiExampleSection :api='JSON.parse("\"/api/bilibili/get-user-video-list/v2\"")' />

