Get user profile detail
This API endpoint allows retrieving the profile details of a specific user, identified by their username.
Path Parameters
username string required
username of user
Query Parameters
client_auth_token string required
Client API token
Header Parameters
access-token string required
user access token
client string required
client access token
expiry string
timestamp of token expiry date
token-type string required
Default value: Bearer
token type
uid string
user uid
Responses
- 200
- 401
- 404
- 500
OK
application/json
Schema
Example (from schema)
Example 1
Schema
- Array [
- ]
success boolean
user_info object
id integer
username string
name string deprecated
first_name string
last_name string
verified boolean
profile_img nullable
followed boolean
original_profile_img nullable
rooms_list object[]
display_name string
user_type string
user_notifications_settings object[]
id integer
emails_disabled boolean
follow_notification boolean
followed_user_added_post_notification boolean
post_commented_notification boolean
post_liked_notification boolean
mention_notification boolean
added_post_in_group_notification boolean
follow_push_notification boolean
followed_user_added_post_push_notification boolean
post_commented_push_notification boolean
post_liked_push_notification boolean
mention_push_notification boolean
added_post_in_group_push_notification boolean
followers integer
followees integer
{
"success": true,
"user_info": {
"id": 0,
"username": "string",
"first_name": "string",
"last_name": "string",
"verified": true,
"followed": true,
"rooms_list": [
{}
],
"display_name": "string",
"user_type": "string",
"user_notifications_settings": [
{
"id": 0,
"emails_disabled": true,
"follow_notification": true,
"followed_user_added_post_notification": true,
"post_commented_notification": true,
"post_liked_notification": true,
"mention_notification": true,
"added_post_in_group_notification": true,
"follow_push_notification": true,
"followed_user_added_post_push_notification": true,
"post_commented_push_notification": true,
"post_liked_push_notification": true,
"mention_push_notification": true,
"added_post_in_group_push_notification": true
}
]
},
"followers": 0,
"followees": 0
}
{
"success": true,
"user_info": {
"id": 1885,
"username": "naveed",
"name": "Naveed Ahmad",
"first_name": "naveed",
"last_name": "ahmad",
"verified": false,
"profile_img": null,
"followed": false,
"original_profile_img": null,
"rooms_list": [],
"display_name": "Naveed Ahmad",
"user_type": "scholar",
"user_notifications_settings": [
{
"id": 2159,
"emails_disabled": true,
"follow_notification": true,
"followed_user_added_post_notification": true,
"post_commented_notification": true,
"post_liked_notification": true,
"mention_notification": true,
"added_post_in_group_notification": true,
"follow_push_notification": true,
"followed_user_added_post_push_notification": true,
"post_commented_push_notification": true,
"post_liked_push_notification": true,
"mention_push_notification": true,
"added_post_in_group_push_notification": true
}
]
},
"followers": 7,
"followees": 24
}
Unauthorized response, api will respond with this 401 eithr user is not logged in or do not have permission to perform some action. Like creating a post in a room, but user is not member of room.
System will also return 401 if api token is missing or invlaid.
application/json
Schema
Example (from schema)
not logged in
missing or invalid api key
Schema
errors string[]
status integer
Default value: 401
success boolean
Default value: false
{
"errors": [
"string"
],
"status": 401,
"success": false
}
{
"errors": [
"You need to sign in or sign up before continuing."
],
"success": false
}
{
"message": "You don't have permission!",
"status": 401,
"success": false
}
Invalid user
application/json
Schema
Example (from schema)
Example 1
Schema
success boolean
Default value: false
message string
{
"success": false,
"message": "string"
}
{
"success": false,
"message": "Invalid user"
}
Internal server error, api will respond with 500 if something went wrong processing the request.
application/json
Schema
Example (from schema)
Schema
success boolean required
Default value: false
message string required
Default value: internal server error
error message
{
"success": false,
"message": "internal server error"
}
Loading...