Mã trạng thái HTTP
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Mã trạng thái HTTP mà máy chủ có thể tạo để phản hồi một yêu cầu HTTP POST
hoặc HTTP GET
:
200 OK
: Yêu cầu thành công.
400 Bad Request
: Đối số không hợp lệ (tải trọng yêu cầu không hợp lệ).
403 Forbidden
: Quyền bị từ chối (ví dụ: khoá API không hợp lệ).
429 Resource Exhausted
: Đã hết hạn mức tài nguyên hoặc đã đạt đến giới hạn tốc độ.
500 Internal Server Error
: Lỗi máy chủ nội bộ (thử lại yêu cầu của bạn).
503 Service Unavailable
: Không có.
504 Gateway Timeout
: Đã hết thời hạn (thử lại yêu cầu của bạn).
Lưu ý: Những ứng dụng nhận được phản hồi HTTP không thành công (tức là bất kỳ mã trạng thái HTTP nào khác ngoài 200 OK
) đều phải chuyển sang chế độ đợi.
Các lý do có thể khiến bạn nhận được mã trạng thái HTTP 400 Bad Request
:
- full Tìmhes.find: Hàm băm không hợp lệ.
- threatListUpdate.fetch:
Yêu cầu cập nhật trống hoặc cấu hình danh sách không hợp lệ, hoặc
danh sách không tồn tại cho cấu hình đã yêu cầu.
- threatMatch.find:
Loại mục nhập mối đe doạ không được đặt trong phần thông tin về mối đe dọa trong yêu cầu.
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-07-25 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-25 UTC."],[[["\u003cp\u003eThe server generates HTTP status codes like \u003ccode\u003e200 OK\u003c/code\u003e for success and various error codes (\u003ccode\u003e400\u003c/code\u003e, \u003ccode\u003e403\u003c/code\u003e, \u003ccode\u003e429\u003c/code\u003e, \u003ccode\u003e500\u003c/code\u003e, \u003ccode\u003e503\u003c/code\u003e, \u003ccode\u003e504\u003c/code\u003e) for different issues encountered during \u003ccode\u003ePOST\u003c/code\u003e or \u003ccode\u003eGET\u003c/code\u003e requests.\u003c/p\u003e\n"],["\u003cp\u003eClients receiving unsuccessful HTTP responses (any code other than \u003ccode\u003e200 OK\u003c/code\u003e) should enter back-off mode to avoid overwhelming the server.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003e400 Bad Request\u003c/code\u003e errors can arise from invalid arguments in requests to \u003ccode\u003efullHashes.find\u003c/code\u003e, \u003ccode\u003ethreatListUpdates.fetch\u003c/code\u003e, or \u003ccode\u003ethreatMatches.find\u003c/code\u003e methods, such as invalid hashes, empty update requests, or missing threat entry types.\u003c/p\u003e\n"]]],["The server responds to HTTP `POST` or `GET` requests with various status codes. `200 OK` indicates success. Errors include `400 Bad Request` for invalid input, `403 Forbidden` for permission issues, `429 Resource Exhausted` for quota/rate limits, `500` for internal errors, `503` for unavailability, and `504` for timeouts. A non-`200 OK` response requires clients to enter back-off mode. `400` errors may occur due to invalid hashes, empty update requests, or missing threat information.\n"],null,["# HTTP Status Codes\n\nHTTP status codes the server can generate in response to an HTTP `POST` or\nHTTP `GET` request:\n\n- `200 OK`: Successful request.\n- `400 Bad Request`: Invalid argument (invalid request payload).\n- `403 Forbidden`: Permission denied (e.g. invalid API key).\n- `429 Resource Exhausted`: Either out of resource quota or reaching rate limiting.\n- `500 Internal Server Error`: Internal server error (retry your request).\n- `503 Service Unavailable`: Unavailable.\n- `504 Gateway Timeout`: Deadline exceeded (retry your request).\n\n**Note** : Clients that receive an unsuccessful HTTP response (that is, any HTTP\nstatus code other than `200 OK`) must enter\n[back-off mode](/safe-browsing/v4/request-frequency#back-off-mode).\n\n\nPossible reasons for receiving HTTP status code `400 Bad Request`:\n\n- [fullHashes.find](/safe-browsing/reference/rest/v4/fullHashes/find): Invalid hash.\n- [threatListUpdates.fetch](/safe-browsing/reference/rest/v4/threatListUpdates/fetch): Empty update request, or invalid list configuration, or list does not exist for the requested configuration.\n- [threatMatches.find](/safe-browsing/reference/rest/v4/threatMatches/find): Threat entry type not set in threat info section of request."]]