Source: https://fyno.docs.pageloop.ai/api-reference/manage-user-profiles/get-wsid-version-profiles-distinct-id

# Get user profile

GET `https://api.fyno.io/v1/{WSID}/{version}/profiles/{distinct_id}`

This API enables you to get an existing user profile.

## Authorization

#### Authorization (header, string, required)

Enter your API Key. If you don't have it already, you can create one from the API Keys page within your Fyno account

## Path Parameters

#### WSID (path, string, required)

Enter your workspace ID. You can obtain this value from the API Keys page within your Fyno account.

#### version (path, enum (string), required) — allowed: live, test

Specify the version for which you would like to manage the user profile.

#### distinct\_id (path, string, required)

Enter the distinct ID that you currently use to identify the user.

## Response

#### 200

Profile fetched successfully

#### channel (object, required)

#### properties

#### discord (string)

The discord ID of the user.

#### email (string)

The email address of the user.

#### inapp (array of object)

#### push (array of object)

#### slack (string)

The channel ID, user ID, or email address of the user.

#### sms (string)

The mobile number of the user.

#### teams (string)

The channel name.

#### voice (string)

The mobile number of the user.

#### whatsapp (string)

The WhatsApp mobile number of the user.

#### country\_code (string, required)

The country code of the user. This value is automatically determined based on the number provided in the SMS channel of the profile. For a list of possible values, please \<a href="<https://content.fyno.io/docs/files/country_code.json>" target="\_blank">click here\</a>.

#### created\_at (string, required)

The timestamp when the profile was created in ISO Date Time Format.

#### distinct\_id (string, required)

The distinct ID used to identify the user.

#### id\_list (array of object, required)

Other profile IDs previously linked to this profile.

#### name (string)

The full name of the user.

#### profile\_id (string, required)

Unique profile ID within Fyno.

#### status (enum (integer), required) — allowed: 1, 0

The status of the user. If `1`, the user is active and should receive notifications. If `0`, the user in inactive and should not receive notifications.

#### timezone (string, required)

The timezone of the user. For a list of possible values, please \<a href="<https://content.fyno.io/docs/files/timezones.json>" target="\_blank">click here\</a>.

#### timezone\_offset (string, required)

The timezone offset of the user. The value is automatically determined based on the timezone provided for the user in the profile.

#### updated\_at (string, required)

The timestamp when the profile was last updated in ISO Date Time Format.

#### version (enum (string), required) — allowed: live, test

The version where the user profile is available.

#### 400

Distinct ID does not exist

#### \_message (string, required)

#### status (string, required)

#### 401

API Key or Workspace ID is invalid. User is unauthorised.

#### \_message (string, required)

#### status (string, required)

#### Request

```bash cURL
curl -X GET 'https://api.fyno.io/v1/{WSID}/{version}/profiles/{distinct_id}' \
  -H 'Authorization: Bearer <token>'
```

```javascript JavaScript
const res = await fetch('https://api.fyno.io/v1/{WSID}/{version}/profiles/{distinct_id}', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer <token>',
  },
});
const data = await res.json();
```

```python Python
import requests

res = requests.get(
    'https://api.fyno.io/v1/{WSID}/{version}/profiles/{distinct_id}',
    headers={'Authorization': 'Bearer <token>'}
)
data = res.json()
```

#### Response

```json 200
{
  "channel": {
    "discord": "101XXXXXXXXXX7XXXXX",
    "email": "abcde@fghi.com",
    "inapp": [
      {
        "integration_id": "\u2026",
        "status": "\u2026",
        "token": "\u2026"
      }
    ],
    "push": [
      {
        "integration_id": "\u2026",
        "status": "\u2026",
        "token": "\u2026"
      }
    ],
    "slack": "CXXXXXXXXXX",
    "sms": "+91 9879X XXXXX",
    "teams": "General",
    "voice": "+91 9879X XXXXX",
    "whatsapp": "+91 9879X XXXXX"
  },
  "country_code": "IN",
  "created_at": "2023-04-21T06:34:01.386Z",
  "distinct_id": "XXXXXXXX",
  "id_list": [
    "6442XXXXXXXXXXXXXXXXc684"
  ],
  "name": "John Doe",
  "profile_id": "6442XXXXXXXXXXXXXXXXc685",
  "status": 1,
  "timezone": "Asia/Kolkata",
  "timezone_offset": "+05:30",
  "updated_at": "2023-04-21T08:42:30.235Z",
  "version": "test"
}
```

```json 400
{
  "_message": "incorrect/non existing distinct_id provided",
  "status": "error"
}
```

```json 401
{
  "_message": "Invalid API details",
  "status": "error"
}
```
