Login For Access Token
POST
/auth/token
const url = 'http://localhost:8000/auth/token';const options = { method: 'POST', headers: {'Content-Type': 'application/x-www-form-urlencoded'}, body: new URLSearchParams({ client_id: 'example', client_secret: 'example', grant_type: 'example', password: 'example', scope: '', username: 'example' })};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:8000/auth/token \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data client_id=example \ --data client_secret=example \ --data grant_type=example \ --data password=example \ --data scope= \ --data username=exampleRequest Bodyrequired
Section titled “Request Bodyrequired”Responses
Section titled “Responses”Successful Response
Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
ctx
Context
object
input
Input
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{ "detail": [ { "ctx": {}, "input": "example", "loc": [ "example" ], "msg": "example", "type": "example" } ]}