Skip to main content
GET
/
users
/
me
Get Current User
curl --request GET \
  --url https://api.example.com/users/me
{
  "id_user": 123,
  "first_name": "<string>",
  "last_name": "<string>",
  "email": "<string>",
  "phone": "<string>",
  "mobile": "<string>",
  "birth_date": "<string>",
  "street": "<string>",
  "postal_code": "<string>",
  "city": "<string>",
  "country": "<string>",
  "biography": "<string>",
  "job": {},
  "portfolio": "<string>",
  "youtube": "<string>",
  "instagram": "<string>",
  "linkedin": "<string>",
  "facebook": "<string>",
  "tiktok": "<string>",
  "known_by_mars_ai": {},
  "role": {},
  "createdAt": {},
  "updatedAt": {}
}
Authentication Required: Bearer token
Roles Allowed: ADMIN, JURY, PRODUCER
Retrieves the profile of the currently authenticated user based on the JWT token. The password field is excluded from the response.

Authentication

This endpoint requires a valid JWT Bearer token. All authenticated roles can access their own profile.
Authorization: Bearer <your_jwt_token>

Request

No parameters required. The user is identified from the JWT token.
cURL Example
curl -X GET https://api.marsai.com/users/me \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."

Response

id_user
integer
Unique user identifier
first_name
string
required
User’s first name
last_name
string
required
User’s last name
email
string
required
User’s email address (unique)
phone
string
Landline phone number
mobile
string
Mobile phone number
birth_date
date
Date of birth
street
string
Street address
postal_code
string
Postal code
city
string
City
country
string
Country
biography
string
Professional biography
job
enum
Professional role: ACTOR, DIRECTOR, PRODUCER, WRITER, OTHER
portfolio
string
Portfolio URL
youtube
string
YouTube profile
instagram
string
Instagram handle
linkedin
string
LinkedIn profile
facebook
string
Facebook profile
tiktok
string
TikTok handle
known_by_mars_ai
enum
How user discovered MarsAI: Par un ami, Vu une publicité du festival, Via le site internet ou application de l'IA
role
enum
required
User role: ADMIN, JURY, PRODUCER
createdAt
datetime
Timestamp of user creation
updatedAt
datetime
Timestamp of last update

Success Response

200 OK
{
  "id_user": 1,
  "first_name": "Alice",
  "last_name": "Martin",
  "email": "alice.martin@example.com",
  "phone": "+33123456789",
  "mobile": "+33612345678",
  "birth_date": "1990-05-15T00:00:00.000Z",
  "street": "123 Rue de la Paix",
  "postal_code": "75001",
  "city": "Paris",
  "country": "France",
  "biography": "Award-winning independent filmmaker",
  "job": "DIRECTOR",
  "portfolio": "https://alicemartin.com",
  "youtube": "alicemartin",
  "instagram": "@alicemartin",
  "linkedin": "alice-martin",
  "facebook": "alice.martin",
  "tiktok": "@alicemartin",
  "known_by_mars_ai": "Par un ami",
  "role": "PRODUCER",
  "createdAt": "2025-01-15T10:30:00.000Z",
  "updatedAt": "2025-01-15T10:30:00.000Z"
}
The password field is automatically excluded from the response for security.

Error Responses

401 Unauthorized
{
  "error": "Token invalide ou manquant"
}
404 Not Found
{
  "error": "Utilisateur non trouvé"
}
500 Internal Server Error
{
  "error": "Erreur lors de la récupération de l'utilisateur"
}