Skip to main content
GET
/
users
/
{id}
Retrieve a user
curl --request GET \
  --url https://api.qonversion.io/v3/users/{id} \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.qonversion.io/v3/users/{id}"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.qonversion.io/v3/users/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.qonversion.io/v3/users/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
require 'uri'
require 'net/http'

url = URI("https://api.qonversion.io/v3/users/{id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api.qonversion.io/v3/users/{id}"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "Bearer <token>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.qonversion.io/v3/users/{id}")
.header("Authorization", "Bearer <token>")
.asString();
{
  "id": "QON_7791a27fc4e747412381842b36a",
  "identity_id": "custom_identity_id",
  "created": 1658489733,
  "environment": "prod"
}
User IDs are generated by the Qonversion SDK (prefixed with QON_) or set manually via the API.

Authorizations

Authorization
string
header
required

Use your Project Key from the Qonversion dashboard (Project Settings -> Project Keys -> Project Key).

Production keys have no prefix; keys prefixed with test_ target the sandbox environment.

Example (sandbox): Bearer test_PV77YHL7qnGvsdmpTs7gimsxUvY-Znl2 Example (production): Bearer JFPATc4VaaWYsfurml3qZ4zsmNw0VfWH

Path Parameters

id
string
required

Qonversion User ID

Response

User retrieved successfully

id
string

Qonversion User ID

Example:

"QON_7791a27fc4e747412381842b36a"

identity_id
string

User Identity ID from your auth system

Example:

"awesome_user"

created
integer

User creation time (Unix epoch seconds)

Example:

1658489733

environment
enum<string>

prod or sandbox

Available options:
prod,
sandbox
Example:

"prod"