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

Return protected data behind Basic auth

GEThttps://api.testingapis.com/api/AuthTest/secure-dataSign in to see this endpoint's URL

Credentials: Admin / Admin@1234, sent as Authorization: Basic QWRtaW46QWRtaW5AMTIzNA==.

HTTP Basic — Admin / Admin@1234

Responses

200
Protected data.
401
Header missing or wrong credentials (empty body).

Example

Request
curl -X GET "https://api.testingapis.com/api/AuthTest/secure-data" \
  -H "Authorization: Basic QWRtaW46QWRtaW5AMTIzNA==" \
  -H "X-TestingApis-Key: YOUR_API_KEY"
Response200 OK
{"message": "Authentication successful", "data": "This is protected data"}

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.