Skip to main content
GET
/
dm_channels
/
{id}
JavaScript
import Whop from '@whop/sdk';

const client = new Whop({
  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted
});

const dmChannel = await client.dmChannels.retrieve('id');

console.log(dmChannel.id);
{
  "id": "<string>",
  "created_at": "123.45",
  "name": "Project Alpha Team",
  "last_message_at": "2023-12-01T05:00:00.401Z"
}

Authorizations

Authorization
string
header
required

A company API key, company scoped JWT, app API key, or user OAuth token. You must prepend your key/token with the word 'Bearer', which will look like Bearer ***************************

Path Parameters

id
string
required

The unique identifier of the DM channel to retrieve.

Response

A successful response

A messaging channel that can be a one-on-one DM, group chat, company support conversation, or platform-level direct message.

id
string
required

The unique identifier for the entity

created_at
string
required

The time the entity was created (in milliseconds since Unix epoch)

Example:

"123.45"

name
string | null
required

A custom display name assigned to this channel by the user. Null if no custom name has been set.

Example:

"Project Alpha Team"

last_message_at
string<date-time> | null
required

The timestamp when the most recent message was sent in this channel. Null if no messages have been sent.

Example:

"2023-12-01T05:00:00.401Z"