Get single user details
Return information about certain user.
GET
/users/:id/
Attributes
Type
Description
id
integer
Unique ID provided in user model
curl -X GET -H "Authorization: Token <your_64_char_api_key>" "https://<your_app_subdomain>.user.com/api/public/users/:id/"
Example response
{
"gravatar_url": null,
"linkedin_url": null,
"email": "up_da_ted@email.com",
"id": 19678376,
"timezone": null,
"unsubscribed": false,
"facebook_url": null,
"browser": null,
"last_seen": null,
"google_url": null,
"region": null,
"last_ip": null,
"score": 0,
"browser_language": null,
"attributes": [
{
"value": true,
"name": "Example attr",
"name_std": "example_attr",
"id": 1109
},
{
"value": "attribute value",
"name": "My string attr",
"name_std": "my_string_attr",
"id": 2429
}
],
"city": null,
"created_at": "2017-06-07T09:41:13.466897Z",
"key": "g3FaYocCy0U6",
"os_type": null,
"lists": [],
"notifications": true,
"chat_id": "Chat ID is deprecated and will be removed in future",
"last_contacted": null,
"updated_at": "2017-06-07T10:29:15.955873Z",
"companies": [
{
"id": 14,
"name": "Company name",
"member_since": "2018-06-14T08:49:56.515083Z"
}
],
"gender": "unknown",
"twitter_url": null,
"country": null,
"first_seen": null,
"tags": [
{
"name": "tag",
"id": 1441
}
],
"page_views": 0,
"status": "visitor",
"name": "Jane Doe",
"resolution": null,
"phone_number": null,
"assigned_to": null
}
var settings = {
"async": true,
"crossDomain": true,
"url": "https://<your_app_subdomain>.user.com/api/public/users/:id/",
"method": "GET",
"headers": {
"authorization": "Token <your_64_char_api_key>"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
var data = null;
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === 4) {
console.log(this.responseText);
}
});
xhr.open("GET", "https://<your_app_subdomain>.user.com/api/public/users/:id/");
xhr.setRequestHeader("authorization", "Token <your_64_char_api_key>");
xhr.send(data);
var request = require("request");
var options = { method: 'GET',
url: 'https://<your_app_subdomain>.user.com/api/public/users/:id/',
headers: { authorization: 'Token <your_64_char_api_key>' } };
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
<?php
$request = new HttpRequest();
$request->setUrl('https://<your_app_subdomain>.user.com/api/public/users/:id/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders(array(
'authorization' => 'Token <your_64_char_api_key>'
));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
import requests
url = "https://<your_app_subdomain>.user.com/api/public/users/:id/"
headers = {'authorization': 'Token <your_64_char_api_key>'}
response = requests.request("GET", url, headers=headers)
print(response.text)
import http.client
conn = http.client.HTTPSConnection("<your_app_subdomain>.user.com")
headers = { 'authorization': "Token <your_64_char_api_key>" }
conn.request("GET", "/api/public/users/:id/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))