Skip to main content

Overview

The user profile endpoint allows authenticated users to retrieve their own profile information, including account details, permissions, roles, and associated resources.

Authentication

All user profile endpoints require authentication using Laravel Sanctum bearer tokens.
Authorization: Bearer {token}

Get Current User Profile

GET /api/me
endpoint
Retrieve the authenticated user’s profile information

Request

curl https://api.animethemes.moe/api/me \
  -H "Authorization: Bearer {token}" \
  -H "Accept: application/json"

Query Parameters

include
string
Include related resources. Available includes:
  • externalprofiles - User’s external profiles (AniList, MAL)
  • notifications - User notifications
  • permissions - User permissions
  • playlists - User playlists
  • roles - User roles
  • roles.permissions - Permissions from roles
Example: include=externalprofiles,playlists
fields[user]
string
Specify which user fields to return. Available fields:
  • id - User ID
  • name - Username
  • email - Email address
  • email_verified_at - Email verification timestamp
  • two_factor_confirmed_at - Two-factor authentication confirmation timestamp
  • created_at - Account creation timestamp
  • updated_at - Last update timestamp
Example: fields[user]=id,name,email

Response

user
object
The authenticated user object

Example Response

{
  "user": {
    "id": 1,
    "name": "johndoe",
    "email": "[email protected]",
    "email_verified_at": "2024-01-15T10:30:00.000000Z",
    "two_factor_confirmed_at": null,
    "created_at": "2024-01-15T10:30:00.000000Z",
    "updated_at": "2024-03-03T15:45:00.000000Z"
  }
}

Example Response with Includes

{
  "user": {
    "id": 1,
    "name": "johndoe",
    "email": "[email protected]",
    "email_verified_at": "2024-01-15T10:30:00.000000Z",
    "two_factor_confirmed_at": null,
    "created_at": "2024-01-15T10:30:00.000000Z",
    "updated_at": "2024-03-03T15:45:00.000000Z",
    "externalprofiles": [
      {
        "profile_id": 1,
        "name": "johndoe",
        "site": 1,
        "visibility": 0,
        "user_id": 1,
        "synced_at": "2024-03-03T12:00:00.000000Z",
        "created_at": "2024-01-20T08:00:00.000000Z",
        "updated_at": "2024-03-03T12:00:00.000000Z"
      }
    ],
    "playlists": [
      {
        "id": 1,
        "name": "My Favorites",
        "visibility": 0,
        "user_id": 1,
        "created_at": "2024-02-01T10:00:00.000000Z",
        "updated_at": "2024-02-15T14:30:00.000000Z"
      }
    ]
  }
}

User Data Structure

Core Attributes

  • id: Unique identifier for the user
  • name: Username (unique, publicly visible)
  • email: User’s email address (private)
  • email_verified_at: Timestamp when email was verified
  • two_factor_confirmed_at: Timestamp when 2FA was enabled (null if disabled)
  • created_at: Account creation timestamp
  • updated_at: Last profile update timestamp

Hidden Attributes

The following attributes are never returned in API responses for security:
  • password - User password hash
  • remember_token - Remember me token
  • two_factor_recovery_codes - 2FA backup codes
  • two_factor_secret - 2FA secret key

Available Relations

Users can include the following related resources:
  • externalprofiles: External site profiles (AniList, MyAnimeList, Kitsu)
  • playlists: User-created playlists
  • notifications: User notifications
  • permissions: Direct permissions assigned to the user
  • roles: User roles
  • roles.permissions: Permissions inherited from roles

Error Responses

401 Unauthorized
error
Returned when the request lacks valid authentication credentials
{
  "message": "Unauthenticated."
}

Notes

The /me endpoint always returns the authenticated user’s profile. You cannot retrieve other users’ profiles through the public API.
Email addresses and other sensitive information are only visible to the authenticated user themselves.
User profiles support Laravel’s soft delete feature. Deleted accounts are permanently removed after 30 days.

Build docs developers (and LLMs) love