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.update('id');
console.log(dmChannel.id);{
"id": "<string>",
"created_at": "123.45",
"name": "Project Alpha Team",
"last_message_at": "2023-12-01T05:00:00.401Z"
}Update the settings of an existing DM channel, such as its display name. Only an admin of the channel can perform this action.
Required permissions:
dms:channel:manageimport 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.update('id');
console.log(dmChannel.id);{
"id": "<string>",
"created_at": "123.45",
"name": "Project Alpha Team",
"last_message_at": "2023-12-01T05:00:00.401Z"
}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 ***************************
The unique identifier of the DM channel to update.
Parameters for UpdateDmChannel
A new custom display name for the DM channel. For example, 'Project Discussion'.
A successful response
A messaging channel that can be a one-on-one DM, group chat, company support conversation, or platform-level direct message.
The unique identifier for the entity
The time the entity was created (in milliseconds since Unix epoch)
"123.45"
A custom display name assigned to this channel by the user. Null if no custom name has been set.
"Project Alpha Team"
The timestamp when the most recent message was sent in this channel. Null if no messages have been sent.
"2023-12-01T05:00:00.401Z"
Was this page helpful?