👨🏭Account
This route verifies the username and password.The route goes thorough numerous checks.The route then creates a session and generates tokens if the user is authenticated.
john@API
honeyBunnies
Successful
Not Found
Internal Server Error
POST /api/v1/account/login HTTP/1.1
Host: www.dyorbackend.tk
Content-Type: application/json
Accept: */*
Content-Length: 49
{
"username": "john@API",
"password": "honeyBunnies"
}
{
"ok": true,
"result": {
"token": {
"access": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL2V4YW1wbGUuYXV0aDAuY29tLyIsImF1ZCI6Imh0dHBzOi8vYXBpLmV4YW1wbGUuY29tL2NhbGFuZGFyL3YxLyIsInN1YiI6InVzcl8xMjMiLCJpYXQiOjE0NTg3ODU3OTYsImV4cCI6MTQ1ODg3MjE5Nn0.CA7eaHjIHz5NxeIJoFK9krqaeZrPLwmMmgI_XiQiIkQ",
"refresh": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL2V4YW1wbGUuYXV0aDAuY29tLyIsImF1ZCI6Imh0dHBzOi8vYXBpLmV4YW1wbGUuY29tL2NhbGFuZGFyL3YxLyIsInN1YiI6InVzcl8xMjMiLCJpYXQiOjE0NTg3ODU3OTYsImV4cCI6MTQ1ODg3MjE5Nn0.CA7eaHjIHz5NxeIJoFK9krqaeZrPLwmMmgI_XiQiIkQ"
}
}
}
Needs Account Authentication
This route logouts of the account.The route first checks and finds the session saved in the database.The route then deletes the session found related to the account.
Successful
Not Found
Internal Server Error
DELETE /api/v1/account/logout HTTP/1.1
Host: www.dyorbackend.tk
Accept: */*
{
"ok": true,
"result": {}
}
Needs Account Authentication
This route refreshes the account session.The route first checks and finds the account session saved in the database.The route then deletes the session, creates a new one and generates new tokens.
Successful
Not Found
Internal Server Error
GET /api/v1/account/refresh HTTP/1.1
Host: www.dyorbackend.tk
Accept: */*
{
"ok": true,
"result": {
"token": {
"access": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL2V4YW1wbGUuYXV0aDAuY29tLyIsImF1ZCI6Imh0dHBzOi8vYXBpLmV4YW1wbGUuY29tL2NhbGFuZGFyL3YxLyIsInN1YiI6InVzcl8xMjMiLCJpYXQiOjE0NTg3ODU3OTYsImV4cCI6MTQ1ODg3MjE5Nn0.CA7eaHjIHz5NxeIJoFK9krqaeZrPLwmMmgI_XiQiIkQ",
"refresh": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL2V4YW1wbGUuYXV0aDAuY29tLyIsImF1ZCI6Imh0dHBzOi8vYXBpLmV4YW1wbGUuY29tL2NhbGFuZGFyL3YxLyIsInN1YiI6InVzcl8xMjMiLCJpYXQiOjE0NTg3ODU3OTYsImV4cCI6MTQ1ODg3MjE5Nn0.CA7eaHjIHz5NxeIJoFK9krqaeZrPLwmMmgI_XiQiIkQ"
}
}
}
This route registers a new account.The route first processes the payload provided.The route then creates a new account entry in our database.
john@API
honeyBunnies
Successful
Internal Server Error
POST /api/v1/account/register HTTP/1.1
Host: www.dyorbackend.tk
Content-Type: application/json
Accept: */*
Content-Length: 49
{
"username": "john@API",
"password": "honeyBunnies"
}
{
"ok": true,
"result": {}
}
Last updated