Skip to main content

getFullTwistURL()

function getFullTwistURL(params: TwistURLParams, baseUrl: string): string;

Builds a full Twist URL (with protocol and hostname) based on the provided parameters

Parameters

ParameterTypeDefault valueDescription
paramsTwistURLParamsundefinedURL parameters including workspace, channel, conversation, thread, etc.
baseUrlstring'https://twist.com'Optional base URL (defaults to 'https://twist.com')

Returns

string

A complete URL including protocol and hostname

Example

getFullTwistURL({ workspaceId: 1, channelId: 42 })
// returns 'https://twist.com/a/1/ch/42/'