# Retrieve Alias by ID

### Request

Retrieve detailed information for a specific alias by providing its unique ID. This endpoint supports both public and authenticated access, including optional basic  `passcode` and advanced  `JWT` authentication mechanisms. It is typically used by clients or front-end applications to fetch alias configurations before joining a session or stream.

**Endpoint:**

```
GET /api/v1/alias/:id
```

**URL:**

```
https://link.api.datagram.network/organization/api/v1/alias/:id
```

### Query Parameter

**Path Parameters:**

<table><thead><tr><th width="146.66668701171875">Name</th><th width="139.3333740234375">Type</th><th>Description</th></tr></thead><tbody><tr><td><strong>id</strong></td><td>string</td><td>The ID of the alias to retrieve.</td></tr></tbody></table>

**Query Parameters**

<table><thead><tr><th width="150.3333740234375">Name</th><th width="130.66668701171875">Type</th><th>Description</th></tr></thead><tbody><tr><td><strong>passcode</strong></td><td>string</td><td>The passcode of the alias to retrieve.</td></tr></tbody></table>

**Example Request**

```
GET /api/v1/alias/bf6oi HTTP/1.1
Host: link.api.datagram.network
Authorization: <token, optional>
```

### **Response**

{% tabs %}
{% tab title="200 " %}
The request was successful, and the alias information was returned in the response body.

#### Body

<table data-header-hidden><thead><tr><th width="120.33331298828125">Parameters</th><th width="91.33331298828125">Type</th><th>Description </th></tr></thead><tbody><tr><td><strong>id</strong> </td><td>string</td><td>Alias ID</td></tr><tr><td><strong>type</strong> </td><td>string</td><td>Alias type ("live", "conference").</td></tr><tr><td><strong>name</strong> </td><td>string</td><td>Alias name.</td></tr><tr><td><strong>passcode</strong> </td><td>string</td><td>Alias passcode to basic authentication.</td></tr><tr><td><strong>jwt_secret</strong></td><td>string</td><td>Alias jwt secret to advanced authentication.</td></tr><tr><td><strong>stream_key</strong></td><td>string</td><td>Alias stream key.</td></tr><tr><td><strong>expired_at</strong></td><td>integer</td><td>Expired time unix timestamp in seconds.</td></tr><tr><td><strong>inserted_at</strong></td><td>integer</td><td>Inserted the time Unix timestamp in seconds.</td></tr></tbody></table>

```
{
  "data": {
    "id": "12345",
    "type": "conference",
    "name": "Alias Name",
    "passcode": null,
    "jwt_secret": null,
    "stream_key": null,
    "expired_at": 1737356308,
    "inserted_at": 1737456308
  }
}
```

{% endtab %}

{% tab title="400" %}
This error is returned when the provided alias ID is invalid, does not exist, or when the request is malformed.

#### Body

| Field       | Type    | Description                                       |
| ----------- | ------- | ------------------------------------------------- |
| **message** | string  | Describes the type of error (e.g., "NOT\_FOUND"). |
| **status**  | integer | HTTP status code indicating the error (e.g., 400) |

```
{
    "error": {
        "message": "NOT_FOUND",
        "status": 400
    }
}
```

{% endtab %}
{% endtabs %}
