در حال بارگذاری…
Returns information about the currently authenticated user.
This endpoint does not accept any parameters.
GET /api/v1/auth/me
Authorization: Bearer {token}
Returns the user resource and a list of permissions.
{
"data": { /* user resource */ },
"permissions": ["permission 1", "permission 2"]
}
For a full schema, see User Resource.
The payload carries is_trainer and is_gym_owner, the user's own statement about which parts of the platform
apply to them. They shape what the client shows and authorize nothing; set them through
PUT /auth/me.
The caller is always the subject here, so the payload includes the self-only fields — among them
referrals_count (how many users they directly referred) and (the weighted score over the whole
referral tree). The two are sourced differently and can briefly disagree; see
.
referral_score| Status | Description | Reference |
|---|---|---|
| 401 | Unauthorized | Authentication error |