Login API response JSON example
Last updated 2026-05-20
Example JSON
Successful POST /auth/login response.
{
"id": 1,
"username": "emilys",
"email": "[email protected]",
"firstName": "Emily",
"lastName": "Johnson",
"image": "https://jsonexamples.com/image/200?text=User+1",
"accessToken": "eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxIiwiaWF0IjoxNzAwMDAwMDAwfQ.signature",
"refreshToken": "eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxfQ.refreshSig"
}Request examples
const res = await fetch('https://jsonexamples.com/auth/login', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ username: 'emilys', password: 'emilyspass' })
});
const session = await res.json();Common variations
Convert this JSON
Generated starting points for TypeScript, JSON Schema, and Zod. Refine before shipping to production.
export interface Login {
"id": number;
"username": string;
"email": string;
"firstName": string;
"lastName": string;
"image": string;
"accessToken": string;
"refreshToken": string;
}