# User Details

{% hint style="danger" %}
**Important Note!**\
\
Constructor Groups’ V1 API has been retired and is no longer available to new customers. Please use the Groups V2 API going forward.\
\
Link to V2 API documentation: <https://developer.perculus.com/v2-en>
{% endhint %}

You can view the details of a user in two different ways:

* [With USER\_ID parameter](#getting-user-details-with-user_id)
* [With USERNAME parameter](#getting-user-details-with-username)

### Getting User Details with USER\_ID

**Example payload:**

{% tabs %}
{% tab title="CURL" %}

```bash
curl --location --request GET 'https://<DOMAIN>/xapi/user/<USER_ID>' \
--header 'Authorization: Bearer <ACCESS_TOKEN>' \
--header 'Content-Type: x-www-form-urlencoded'
```

{% endtab %}

{% tab title="Python" %}

```python
from perculus_sdk.client import APIClient

# API client
client = APIClient()
...

# Get user by id
user = client.users.get_user_by_id("<USER_ID>")
print(user)
```

{% endtab %}

{% tab title="C#" %}

```
// ASAP :)
```

{% endtab %}

{% tab title="NodeJS" %}

```javascript
import APIClient from "perculus-sdk"

// API client
const client = new APIClient()
...

// Get user 
const user = client.users.getUser("<USER_ID>")
console.log(user)
```

{% endtab %}

{% tab title="Go" %}

```
// ASAP :)
```

{% endtab %}
{% endtabs %}

Example response:

```json
{
    "user_id": "<USER_ID>",
    "name": "john",
    "surname": "Doe",
    "username": "johndoe",
    "email": "john@doe.com",
    "role": "u",
    "mobile": "",
    "login_allowed": true,
    "status": 1,
    "lang": "tr-TR",
    "timezone": null,
    "expires_at": null,
    "creation_date": "2024-08-01T00:45:03.8888474+00:00",
    "updating_date": null
}
```

### Getting User Details with USERNAME

**Example payload:**

{% tabs %}
{% tab title="CURL" %}

```bash
curl --location --request GET 'https://<DOMAIN>/xapi/user/<USERNAME>' \
--header 'Authorization: Bearer <ACCESS_TOKEN>' \
--header 'Content-Type: x-www-form-urlencoded'
```

{% endtab %}

{% tab title="Python" %}

```python
from perculus_sdk.client import APIClient

# API client
client = APIClient()
...

# Get user by username
user = client.users.get_user_by_username("<USERNAME>")
print(user)
```

{% endtab %}

{% tab title="C#" %}

```
// ASAP :)
```

{% endtab %}

{% tab title="NodeJS" %}

```javascript
import APIClient from "perculus-sdk"

// API client
const client = new APIClient()
...

// Get user 
const user = client.users.getUser("<USERNAME>")
console.log(user)
```

{% endtab %}

{% tab title="Go" %}

```
// ASAP :)
```

{% endtab %}
{% endtabs %}

Example response:

```json
{
    "user_id": "<USER_ID>",
    "name": "john",
    "surname": "Doe",
    "username": "johndoe",
    "email": "john@doe.com",
    "role": "u",
    "mobile": "",
    "login_allowed": true,
    "status": 1,
    "lang": "tr-TR",
    "timezone": null,
    "expires_at": null,
    "creation_date": "2024-08-01T00:45:03.8888474+00:00",
    "updating_date": null
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.perculus.com/services/user-management/user-detail.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
