SIP

Giả lập phản hồi 433 Anonymity Disallowed

The request has been rejected because the server policy requires caller identification and the request was anonymous.

Xem tài liệu tham khảo đầy đủ →

1 Phản hồi HTTP

Phản hồi HTTP
HTTP/1.1 433 Anonymity Disallowed
Content-Type: application/json
Date: Tue, 25 Feb 2026 12:00:00 GMT
Content-Length: 68

{
  "error": "anonymity_disallowed",
  "message": "Anonymity Disallowed"
}

2 Kiểm tra với curl

terminal
curl -i https://httpbin.org/status/433

3 Trả về 433 Anonymity Disallowed trong Framework của bạn

django
from django.http import JsonResponse


def my_view(request):
    return JsonResponse(
        {"error": "anonymity_disallowed", "message": "Anonymity Disallowed"},
        status=433,
    )
flask
from flask import Flask, jsonify

app = Flask(__name__)


@app.route("/endpoint")
def my_endpoint():
    return jsonify({"error": "anonymity_disallowed", "message": "Anonymity Disallowed"}), 433
fastapi
from fastapi import FastAPI
from fastapi.responses import JSONResponse

app = FastAPI()


@app.get("/endpoint")
def my_endpoint():
    return JSONResponse(
        content={"error": "anonymity_disallowed", "message": "Anonymity Disallowed"},
        status_code=433,
    )
express.js
// Express.js
app.get('/endpoint', (req, res) => {
  res.status(433).json({"error": "anonymity_disallowed", "message": "Anonymity Disallowed"});
});
spring boot
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import java.util.Map;

@RestController
public class MyController {

    @GetMapping("/endpoint")
    public ResponseEntity<Map<String, Object>> myEndpoint() {
        return ResponseEntity
            .status(433)
            .body(Map.of("error", "anonymity_disallowed",
                         "message", "Anonymity Disallowed"));
    }
}
go net/http
package main

import (
    "encoding/json"
    "net/http"
)

func myHandler(w http.ResponseWriter, r *http.Request) {
    w.Header().Set("Content-Type", "application/json")
    w.WriteHeader(433)
    json.NewEncoder(w).Encode(map[string]string{
        "error":   "anonymity_disallowed",
        "message": "Anonymity Disallowed",
    })
}
ruby on rails
class MyController < ApplicationController
  def my_action
    render json: {"error": "anonymity_disallowed", "message": "Anonymity Disallowed"},
           status: :anonymity_disallowed
  end
end
asp.net core
// ASP.NET Core Minimal API
app.MapGet("/endpoint", () =>
    Results.Json(
        new { error = "anonymity_disallowed", message = "Anonymity Disallowed" },
        statusCode: 433
    )
);

Thêm trang giả lập SIP