Skip to main content

Me

This endpoint returns the user identified by the authentication token

info

This operation requires authentication or simply JWT token.

HTTP Request

GET /api/v2/user/me/

Example Request

const headers = {
'Accept':'application/json',
'Authorization: Bearer <token>'
};

fetch('/api/v2/user/me/',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});

Responses

StatusMeaningDescriptionSchema
200OKResponse status codeInline

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
idintegerfalseread-onlyA unique integer value identifying this user
usernamestringfalseread-onlyThe username of the user. Max 255 characters. Letters, numbers and -/_ characters
real_namestringfalsenoneReal name. Max 255 characters
avatarstring(binary)¦nullfalsenoneAvatar of the user
ext_idintegerfalseread-onlyThe external ID of the user. It is assigned only during signup
followings_counterinteger¦nullfalseread-onlyNumber of followings of the user. Only if dynamic preference configurations.follow_enabled is true
followers_counterinteger¦nullfalseread-onlyNumber of followers of the user. Only if dynamic preference configurations.follow_enabled is true
posts_counterinteger¦nullfalseread-onlyNumber of posts created by the user. Only if dynamic preference configurations.post_type_enabled is true
discussions_counterinteger¦nullfalseread-onlyNumber of discussions created by the user. Only if dynamic preference configurations.post_type_enabled is true
polls_counterinteger¦nullfalseread-onlyNumber of polls created by the user. Only if dynamic preference addons.polls_enabled is true or if the user has a staff role
connection_statusstring¦nullfalseread-onlyThe connection status between the request user and this user
emailstringfalsenoneThe user email
email_isvalidbooleanfalsenoneIf the user email is valid
categories_counterinteger¦nullfalseread-onlyNumber of categories followed by the user
biostringfalsenoneUser biography
locationstringfalsenoneUser location. Max 100 characters
location_lat_lngstringfalsenoneLocation in coordinates. It is populated automatically if "Google Geocoding" integration is active. Format: lat,lng
position_lat_lngstringfalsenoneUser current position. Format: lat,lng
date_of_birthstring(date)falsenoneDate of birth. Format: YYYY-MM-DD (ISO 8601)
descriptionstringfalsenoneUser description. Max 50 characters
genderstringfalsenoneUser gender. Values: Male, Female, Unspecified. Default: Unspecified
websitestring(uri)falsenoneUser website. Max 200 characters.
coverstring(binary)¦nullfalsenoneThe user cover
tagsTag¦[]falsenoneUser's tag list. List of Tag
reputationintegerfalseread-onlyUser reputation.
community_badgebooleanfalseread-onlyCommunity badge active. Default: False.
reg_approvedbooleanfalseread-onlyRegistration approved (false only if users_approval_enabled=true and the user is not approved)
permissionUserPermissionfalseread-onlyList of user permissions
rolestringfalseread-onlyThe user role
unseen_interactions_counterintegerfalseread-onlyThe unseen interaction number
unseen_notification_banners_counterintegerfalseread-onlyThe unseen notification banners number
company_namestringfalseread-onlyUser company name
company_rolestringfalseread-onlyUser company role

Example responses

{
"id": "integer",
"username": "string",
"real_name": "string",
"avatar": "string",
"ext_id": "integer",
"followings_counter": "integer",
"followers_counter": "integer",
"posts_counter": "integer",
"discussions_counter": "integer",
"polls_counter": "integer",
"connection_status": "string",
"categories_counter": "integer",
"email": "string",
"email_isvalid": "boolean",
"date_joined": "string",
"bio": "string",
"location": "string",
"location_lat_lng": "string",
"position_lat_lng": "string",
"date_of_birth": "string",
"description": "string",
"gender": "string",
"website": "string",
"cover": "string",
"tags": [{Tag}],
"reputation": "integer",
"community_badge": "boolean",
"reg_approved": "boolean",
"permission": {UserPermission},
"role": "string",
"unseen_interactions_counter": "integer",
"unseen_notification_banners_counter": "integer",
"deleted" : "boolean",
"company_name": "string",
"company_role": "string"
}