Skip to main content
POST
/
v1
/
integrations
/
channel-endpoints
/
link
TypeScript
import { Novu } from "@novu/api";

const novu = new Novu({
  secretKey: "YOUR_SECRET_KEY_HERE",
});

async function run() {
  const result = await novu.integrations.linkChannelEndpoint({
    integrationIdentifier: "telegram-bot",
    subscriberId: "subscriber-123",
  });

  console.log(result);
}

run();
{
  "url": "https://t.me/MyBot?start=AbCdEfGhIjKlMnOpQrStUvWxYz012345",
  "providerMetadata": {
    "botUsername": "MyBot",
    "expiresAt": "2026-06-23T12:00:00.000Z"
  }
}

Authorizations

Authorization
string
header
required

API key authentication. Allowed headers-- "Authorization: ApiKey <novu_secret_key>".

Headers

idempotency-key
string

A header for idempotency purposes

Body

application/json
integrationIdentifier
string
required

Integration identifier for the chat provider integration

Example:

"telegram-bot"

subscriberId
string
required

External subscriber identifier to link to their chat identity

Example:

"subscriber-123"

Response

OK

url
string
required

URL the subscriber opens to link their chat identity (OAuth URL or deep link)

Example:

"https://t.me/MyBot?start=AbCdEfGhIjKlMnOpQrStUvWxYz012345"

providerMetadata
object

Provider-specific metadata returned alongside the link URL

Example:
{
"botUsername": "MyBot",
"expiresAt": "2026-06-23T12:00:00.000Z"
}