POST /api/v1/user/confirmation
This endpoints requires Administrator permissions. (@token_required)
Description
This endpoint facilitates user to add Administrator permissions for other existing accounts.
Users are required to input the username to add permissions and their previous active authentication token.
If the token is still valid and not expired the existing member account will be updated with confirmation to True.
Body (form data)
This endpoint expects the following data to be provided in the request body:
username: The username for an existing member account. (string)
Headers
This endpoint expects the following data to be provided in the request headers:
token: The Administrator generated token. (string)
Request
Response
The response will indicate the success or failure of the login process.
Success Response
{
"code": "200",
"status": "Success",
"message": "User confirmed successfully"
}Bad Request (400)
If the token is missing in the request header.
{
"code": "400",
"status": "Bad Request",
"message": "Token header is required"
}Unauthorized (401)
If the Administrator token is expired.
{
"code": "401",
"status": "Unauthorized",
"message": "Token expired"
}If the Administrator token is incorrect.
{
"code": "401",
"status": "Unauthorized",
"message": "Token incorrect"
}Bad Request (400)
If the username is missing in the request body.
{
"code": "400",
"status": "Bad Request",
"message": "Username form is required"
}Not Found (404)
If the provided username account don't exists.
{
"code": "404",
"status": "Not Found",
"message": "User not registered"
}Conflict (409)
If the provided member username already have Administrator permissions: confirmed: True.
{
"code": "403",
"status": "Unauthorized",
"message": "User not confirmed"
}