Token Generation Endpoint POST
The generate token endpoint allows users to generate an 30-day expiring token by providing their desired username and password.
POST
/user/gen-token
content_copy
Authorization Header
This endpoint uses Basic Authentication for the changing of account's username.
Parameter
Type
Description
username
String
The registered username of the account.
password
String
The registered password of the account.
Response
Successful Token Generation
- Status Code: 200 Ok
- Response Body:
json
{
"message"
:
"Token generated for [username]."
,
}
Renew Token Expiration Endpoint PATCH
This endpoint allows users to renew their generated token's expiration
PATCH
/user/renew-token
content_copy
Authorization Header
This endpoint uses Bearer Authentication for the token renewal.
Parameter
Description
Bearer
The user's generated token
Response
Successful Token Renewal
- Status Code: 200 Ok
- Response Body:
json
{
"message"
:
"Token expiration is renewed."
,
}