New in 2.4: Test runs you can trust See what's new →

Skema autentikasi

Skema autentikasi: satu endpoint per skema umum (Basic, Bearer, API key di header/query/cookie, Digest, penandatanganan request HMAC, pemeriksaan role dan scope, CSRF double-submit) untuk menguji cara klien mengirim kredensial. Semua kredensial bersifat tetap dan didaftar oleh GET /api/auth.

Contoh request

List every auth scheme with its test credentials. Referensi lengkap dan tombol Send (dalam bahasa Inggris).

cURL
curl -X GET "https://api.testingapis.com/api/auth"
Jalankan di Studio
Response · 200 OK
{
  "message": "Hardcoded credentials for every auth scheme. Send them wrong to test your 401 handling; the role endpoints also return 403.",
  "schemes": [
    {
      "scheme": "basic",
      "endpoint": "GET /api/auth/basic",
      "credentials": {"username": "apibee", "password": "password123"}
    },
    {
      "scheme": "basic (path creds)",
      "endpoint": "GET /api/auth/basic/{user}/{pass}",
      "credentials": "Any user/pass — must match the path"
    },
    "… 12 more items"
… (2 more lines)