Retrieve User Information

You can use this API request to retrieve detailed information about a user.

/services/v2/user/[userId].json

You can use the following parameters in your retrieve user information request:

Projection: include, exclude, includeOnly
Other options: wrap, v1

🚧

Permissions & Notes:

  • You must have the View user's profile permission under Anonymous Roles in the Advanced Editor.
  • The URI/URL parameter userId is a placeholder for the actual identifier of the topic.
    • You should format it as a valid integer (digit characters only).
  • With the includeOnly parameter set to id and name (/services/v2/user.json?includeOnly=id,name) to the AnswerHub REST API.
  • We added this request in version 1.6.3.

Sample Request

A GET retrieve user information request to retrieve information for a user (userId: 7) sent to our https://apidocs.cloud.answerhub.com using a human-readable Username/Password (answerhub/test123) would look like this:

curl 
-u answerhub:test123 
-H "Accept: application/json" 
-H "Content-type: application/json" 
-X GET "https://apidocs.cloud.answerhub.com/services/v2/user/7.json"

Sample Response

{
    "id": 7,
    "type": "user",
    "creationDate": 1542778947000,
    "creationDateFormatted": "11/21/2018 05:42 AM",
    "modificationDate": 1548971891000,
    "username": "dzone",
    "slug": "dzone",
    "gold": 0,
    "silver": 0,
    "bronze": 2,
    "reputation": 36,
    "moderator": false,
    "superuser": true,
    "avatar": "http://apidocs.cloud.answerhub.com/users/7/photo/view.html",
    "postCount": 10,
    "followerCount": 0,
    "followCount": 0,
    "userFollowCount": 0,
    "about": "I am the main test user for the community!",
    "active": true,
    "suspended": false,
    "deactivated": false,
    "groups": [
        {
            "id": "5",
            "creationDate": 1542778947000,
            "creationDateFormatted": "11/21/2018 05:42 AM",
            "modificationDate": 1547066163000,
            "name": "Super Users"
        },
        {
            "id": "6",
            "creationDate": 1542778947000,
            "creationDateFormatted": "11/21/2018 05:42 AM",
            "modificationDate": 1547066174000,
            "name": "Network Administrators"
        }
    ],
    "extraData": {}
}
{"id":7,"type":"user","creationDate":1542778947000,"creationDateFormatted":"11/21/2018 05:42 AM","modificationDate":1548971891000,"username":"dzone","slug":"dzone","gold":0,"silver":0,"bronze":2,"reputation":36,"moderator":false,"superuser":true,"emailHash":"eaaeed1476bfc5ffd9411867bfb11fe8df75ad961399b2913645b3f8cc28fbcc","avatar":"http://apidocs.cloud.answerhub.com/users/7/photo/view.html","postCount":10,"followerCount":0,"followCount":0,"userFollowCount":0,"about":"I am the main test user for the community!","active":true,"suspended":false,"deactivated":false,"groups":[{"id":"5","creationDate":1542778947000,"creationDateFormatted":"11/21/2018 05:42 AM","modificationDate":1547066163000,"name":"Super Users"},{"id":"6","creationDate":1542778947000,"creationDateFormatted":"11/21/2018 05:42 AM","modificationDate":1547066174000,"name":"Network Administrators"}],"extraData":{}}
Language
Authorization
Basic
base64
:
Click Try It! to start a request and see the response here!