> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://fyno.io/docs/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://fyno.io/docs/_mcp/server.

# Get user profile

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

This API enables you to get an existing user profile.

Reference: https://fyno.io/docs/api-reference/get-user-profile

## Authentication

- `Authorization` header (bearer token, 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

## Request

### Path parameters

- `WSID` (string, required) — Enter your workspace ID. You can obtain this value from the API Keys page within your Fyno account.
- `version` (string, required) — Specify the version for which you would like to manage the user profile.
- `distinct_id` (string, required) — Enter the distinct ID that you currently use to identify the user.

## Response

### 200

Profile fetched successfully

- `channel` (inline_response_200_channel, required)
- `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 click here.
- `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` (list of any, required) — Other profile IDs previously linked to this profile.
- `profile_id` (string, required) — Unique profile ID within Fyno.
- `status` (enum, required) — 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.
  - Allowed values: `1`, `0`
- `timezone` (string, required) — The timezone of the user. For a list of possible values, please click here.
- `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, required) — The version where the user profile is available.
  - Allowed values: `live`, `test`
- `name` (string, optional) — The full name of the user.

## Errors

### 400 Bad Request Error

Distinct ID does not exist

- `_message` (string, required)
- `status` (string, required)

### 401 Unauthorized Error

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

- `_message` (string, required)
- `status` (string, required)

## Types

### inline_response_200_channel

- `discord` (string, optional) — The discord ID of the user.
- `email` (string, optional) — The email address of the user.
- `inapp` (list of inline_response_200_channel_inapp, optional)
- `push` (list of inline_response_200_channel_push, optional)
- `slack` (string, optional) — The channel ID, user ID, or email address of the user.
- `sms` (string, optional) — The mobile number of the user.
- `teams` (string, optional) — The channel name.
- `voice` (string, optional) — The mobile number of the user.
- `whatsapp` (string, optional) — The WhatsApp mobile number of the user.

### inline_response_200_channel_inapp

- `token` (string, required) — Enter the distinct ID or the generated token of the user.
- `integration_id` (string, optional) — The integration ID that was used to generate the above token. If this value is null, then the above token is used for all InApp integrations. The integration ID can be verified from Fyno's integrations page.
- `status` (enum, optional) — The status of the token. If `1`, the token is active and should receive notifications. If `0`, the token in inactive and should not receive notifications.
  - Allowed values: `1`, `0`

### inline_response_200_channel_push

- `integration_id` (string, optional) — The integration ID that was used to generate the above token. If this value is null, then the above token is used for all push integrations. The integration ID can be verified from Fyno's integrations page.
- `status` (enum, optional) — The status of the token. If `1`, the token is active and should receive notifications. If `0`, the token in inactive and should not receive notifications.
  - Allowed values: `1`, `0`
- `token` (string, optional) — The push token of the user.

## Examples

**Response**

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

**SDK Code**

```python
import requests

url = "https://api.fyno.io/v1/FYXXXXXXXX/version/profiles/XXXXXXXX"

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

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

print(response.json())
```

```javascript
const url = 'https://api.fyno.io/v1/FYXXXXXXXX/version/profiles/XXXXXXXX';
const options = {method: 'GET', headers: {Authorization: 'Bearer <apiKey>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

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

func main() {

	url := "https://api.fyno.io/v1/FYXXXXXXXX/version/profiles/XXXXXXXX"

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

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

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

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

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.fyno.io/v1/FYXXXXXXXX/version/profiles/XXXXXXXX")

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

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

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.fyno.io/v1/FYXXXXXXXX/version/profiles/XXXXXXXX")
  .header("Authorization", "Bearer <apiKey>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.fyno.io/v1/FYXXXXXXXX/version/profiles/XXXXXXXX', [
  'headers' => [
    'Authorization' => 'Bearer <apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.fyno.io/v1/FYXXXXXXXX/version/profiles/XXXXXXXX");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <apiKey>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.fyno.io/v1/FYXXXXXXXX/version/profiles/XXXXXXXX")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```