TestingAPIs is still being built. If something breaks, email support@testingapis.com.

Authenticate with Basic auth against credentials taken from the URL

GEThttps://api.testingapis.com/api/auth/basic/{user}/{pass}Sign in to see this endpoint's URL

httpbin style: GET /api/auth/basic/foo/bar with Authorization: Basic base64(foo:bar).httpbin style: GET … with Authorization: Basic base64(foo:bar).

HTTP Basic — apibee / password123

Parameters 2

NameTypeDescription
userrequiredpath · stringUsername the Authorization header must contain.
passrequiredpath · stringPassword the Authorization header must contain.

Responses

200
Header matches the URL credentials.
401
Header missing, malformed or different. Includes a Basic challenge.

Example

Request
curl -X GET "https://api.testingapis.com/api/auth/basic/apibee/password123" \
  -H "Authorization: Basic YXBpYmVlOnBhc3N3b3JkMTIz" \
  -H "X-TestingApis-Key: YOUR_API_KEY"
Response200 OK
{"authenticated": true, "scheme": "basic", "user": "apibee"}

Sign in to see the details

The parameters, request and response examples and the live Try it panel for this endpoint are for signed-in members. Accounts are free and take a few seconds to create.