curl --request GET \
--url https://api.example.com/api/v1/auth/me{
"status": 123,
"data": {
"id": 123,
"name": "<string>",
"email": "<string>",
"roles": [
{
"id": 123,
"name": "<string>"
}
],
"permissions": [
{
"id": 123,
"name": "<string>"
}
]
},
"meta": {}
}Retrieve the authenticated user’s information including roles and permissions
curl --request GET \
--url https://api.example.com/api/v1/auth/me{
"status": 123,
"data": {
"id": 123,
"name": "<string>",
"email": "<string>",
"roles": [
{
"id": 123,
"name": "<string>"
}
],
"permissions": [
{
"id": 123,
"name": "<string>"
}
]
},
"meta": {}
}Authorization header.
Authorization: Bearer {your_access_token}
Show data properties
{
"status": 200,
"data": {
"id": 1,
"name": "John Doe",
"email": "[email protected]",
"roles": [
{
"id": 1,
"name": "admin"
},
{
"id": 3,
"name": "inventory-manager"
}
],
"permissions": [
{
"id": 5,
"name": "view-items"
},
{
"id": 12,
"name": "create-inventory"
},
{
"id": 18,
"name": "manage-users"
}
]
},
"meta": null
}
Show 401 Unauthorized - Missing or Invalid Token
{
"message": "Unauthenticated."
}
Authorization header is providedShow 500 Internal Server Error
{
"status": 500,
"message": "An unexpected error occurred"
}
curl -X GET https://api.sushigo.local/api/v1/auth/me \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGc..."
roles array includes all roles assigned to the user via Spatie permissionspermissions array includes direct user permissions (not those inherited from roles)