Skip to main content
GET
/
api
/
v1
/
auth
/
me
Get Current User
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": {}
}

Authentication

Required: Bearer token in the Authorization header.
Authorization: Bearer {your_access_token}

Request Parameters

This endpoint does not require any query parameters or request body.

Response

status
integer
HTTP status code (200 for success)
data
object
meta
object
Additional metadata (null for this endpoint)

Success Response Example

{
  "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
}

Error Responses

Code Examples

curl -X GET https://api.sushigo.local/api/v1/auth/me \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGc..."

Usage Notes

  • This endpoint is useful for:
    • Validating that a stored token is still valid
    • Fetching fresh user data after login
    • Implementing client-side authorization based on roles/permissions
    • Displaying the current user’s profile information
  • The roles array includes all roles assigned to the user via Spatie permissions
  • The permissions array includes direct user permissions (not those inherited from roles)
  • To check all permissions (including those from roles), use the backend permission checking methods

Build docs developers (and LLMs) love