API Description
- To create a token to use authorizes API’s.
- The token created will be used to access all APIs by passing it in the header with the prefix ‘Bearer’.
- For example:
Bearer abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890
API Endpoint
POST
/api/v1/auth/create-tokenBody Payload
🔽 Payload
{
"username": "username",
"password": "P@$5word"
}Responses
🟢 Success
{
"success": true,
"message": "Token created successfully.",
"data": {
"token": "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890",
"user": {
"token": "wcqNEMHs9Ue4iukvJxxgfnhy1",
"username": "apiUser",
"email": "apiuser@richervalues.com",
"first_name": "API",
"last_name": "User"
},
"company": {
"token": "wNpOV47PLkRuS8taZpMaPQDTU"
}
},
"meta": {},
"errors": []
}