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

Log in and receive a JWT for the Admin endpoint

POSThttps://api.testingapis.com/api/User/LoginSign in to see this endpoint's URL

Credentials: Michael / Thompson (role Admin). The token expires after 15 minutes. Send it as Authorization: Bearer <token> to GET /api/Admin/authorize.Credentials: Michael / Thompson (role Admin). The token expires after 15 minutes. Send it as Authorization: Bearer <token> to GET ….

Request body

Optional. application/json, text/json, application/*+json, application/xml, text/xml, application/*+xml. Model: UserLogin. Username and password.

Example body
{"username": "Michael", "password": "Thompson"}

Responses

200
Token and login time.
404
Unknown username or wrong password (plain-text body).

Example

Request
curl -X POST "https://api.testingapis.com/api/User/Login" \
  -H "Content-Type: application/json" \
  -d '{"username": "Michael", "password": "Thompson"}' \
  -H "X-TestingApis-Key: YOUR_API_KEY"
Response200 OK
{
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6Ik1pY…
  "loginTime": "2026-09-30 23:56:45
}

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.