OAuth2 compatible token login
POST
/api/v1/auth/login/access-token
const url = 'https://api.totalview.energy/api/v1/auth/login/access-token';const options = { method: 'POST', headers: {'Content-Type': 'application/x-www-form-urlencoded'}, body: new URLSearchParams({ grant_type: 'example', username: 'example', password: 'example', scope: '', client_id: 'example', client_secret: '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 https://api.totalview.energy/api/v1/auth/login/access-token \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data grant_type=example \ --data username=example \ --data password=example \ --data scope= \ --data client_id=example \ --data client_secret=exampleRequest Body required
Section titled “Request Body required ” Media type application/x-www-form-urlencoded
Responses
Section titled “ Responses ”Successful Response
Media type application/json
Example generated
exampleValidation Error
Media type application/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Example generated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}