User Info API

User Info API

This REST API enables you to obtain information from the Kahuna system that has been collected from a specific user. Information available includes

Note: Kahuna allows a maximum of 1 user per request.

API Request

Request URI and Header



To target the production environment:

To target the sandbox environment:


Request Header

Content-Type: application/json

Authorization: The API uses Basic Authentication (BasicAuth), which requires credentials in the form of a username (Secret Key) and password (API Key).

The Secret Key and API Key for the namespace are:

Secret Key: Available in Settings
API Key: Available in Settings

KAHUNA_API_CHECKSUM: API checksum to validate the request

The value of the KAHUNA_API_CHECKSUM header is calculated as the MD5 hash of (the API Key reversed + the user credential value in this request)

Python example:

hashlib.md5(api_key[::-1] + credential_value).hexdigest()
Request Body

The request body is a JSON object that contains the credentials of a user (limit 1 per request).


In the request body, users are formatted as a dictionary of credentials that identify a user.

The following table describes the User Info object format.


Required. A dictionary of user credential key-value pairs.

  • Each key must be a Kahuna white-listed user credential type.
  • You can specify only one credential.
      {"email": ""}

API Response

The response to a User Info API request consists of an HTTP response code and a response body in JSON format.

HTTP Response Codes

The servers successfully parsed the request, and authentication and authorization also succeeded.

Note: This response code is returned even if all the update requests fail. For example, this response code is returned if parsing and authentication or authorization succeed but the servers are unable to find any of the specified users.

400 Parsing error. You specified invalid options or the JSON is written incorrectly. The response body provides error details.
401 Authentication error. Your credentials are written incorrectly or your credentials are not valid. The response body provides error details.
409 Authorization error. Your user name and password are authorized for Kahuna but you do not have permission to use the User Attributes API.
500 Kahuna internal server error.
Response Body

The response body is an object that contains one or more response object elements, depending on the HTTP response code:

  • HTTP response code 200—the object contains an element for the User object in the request body.
  • HTTP response codes 400, 401, 409, and 500—the array contains a single response object that provides additional information about the error.

Note: If the HTTP response code is not 200, the response object represents the status of the overall request instead of the status of the request for an individual user.

Response Object

The format of a response object is shown in the following table.


The status of the delete request for the user. If true, the request succeeded. No other fields are present in the response object. If false, the request failed. Other fields in the response object provide additional information about the failure.


If an error occurred, this field provides a human-readable error message.


If an error occurred, this field provides an HTTP error code. Error code 404 indicates that the servers cannot find the user given the supplied credentials. This code is not returned in the overall HTTP response code.

      {"email": ""},

If the user credential "email": "" points to an existing user then the HTTP response code is 200 and the response body resembles the following JSON:

		"first_visit":"2018-05-06 00:00:00",
		"last_visit":"2018-05-07 00:00:00",
				"last_seen":"2018-05-07 00:00:00"
			"name":"George Doe",

If the user credential "email": "" does not point to an existing user then the HTTP response code is 200 and the response body resembles the following JSON:

"error_code": 404,
"success": false,
"error": "User not found"
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request