Generates a new bearer token. The token_expiration_date must be a date after today.
/api/v1/auth/token
mtellesy@gmail.com
12345678
muiee
2024-08-22
Token created successfully
Unauthorized – Invalid credentials
Unprocessable Entity – Expiration date error
An error response object
curl -L \ --request POST \ --url 'http://127.0.0.1:8080/api/v1/auth/token' \ --header 'Content-Type: application/json' \ --data '{"email":"mtellesy@gmail.com","password":"12345678","token_name":"muiee","token_expiration_date":"2024-08-22"}'
{ "data": { "token": { "name": "muiee", "value": "TOKEN_VALUE", "expiration_date": "2024-08-22" } } }