Shows the profile of the current logged in user. Requires a logged in user.
{warning} A user must have his/her account verified
Method | Uri | Auth | Permissions |
---|---|---|---|
GET |
/v1/profile |
Bearer JWT-Token |
none |
The API requires a header Accept
and Authorization
to be submitted with the request:
{
"Accept": "application/json",
"Authorization": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3M..."
}
Condition : All required data provided is valid and added to the request body.
Code : 201 Created
Content example : Response will reflect back the created message':
{
"id": "ccaf3c6f-1512-4dd6-b7b5-...",
"firstName": "Firstname",
"lastName": "Lastname",
"email": "some@email.com",
"email_verified_at": "2020-07-07T22:26:53.000000Z",
"created_at": "2020-07-07T22:26:28.000000Z",
"updated_at": "2020-07-07T22:26:53.000000Z",
"roles": [{
"name": "admin",
"guard_name": "api",
"pivot": {
"model_id": "48f84ffd-a436-4c44-9a7b-a8fd8f577374",
"role_id": 1,
"model_type": "App\Models\User"
}
}]
}
Condition : If a user is not logged in or header data is imcomplete.
Code : 401 Unauthorized
Content example :
{
"message": "Unauthenticated."
}
Code : 403 Forbidden
Content example :
{
"message": "Your email address is not verified."
}