Get single user details


Return information about certain user.

GET

/users-by-id/:user_id/

Attributes
Type
Description
user_id
integer
Your custom user ID
curl -X GET -H "Authorization: Token <your_64_char_api_key>" "https://app.userengage.com/api/public/users-by-id/:user_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
}
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://app.userengage.com/api/public/users-by-id/:user_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://app.userengage.com/api/public/users-by-id/:user_id/");
xhr.setRequestHeader("authorization", "Token <your_64_char_api_key>");

xhr.send(data);
var request = require("request");

var options = { method: 'GET',
  url: 'https://app.userengage.com/api/public/users-by-id/:user_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://app.userengage.com/api/public/users-by-id/:user_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://app.userengage.com/api/public/users-by-id/:user_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("app.userengage.com")

headers = { 'authorization': "Token <your_64_char_api_key>" }

conn.request("GET", "/api/public/users-by-id/:user_id/", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))