sendLink
api.sendLink(options, threadId[, type])
Parameters
- options
SendLinkOptions - threadId
string - type
ThreadType?- mặc định
ThreadType.User
- mặc định
Return
Promise<SendLinkResponse>
Types
ts
export type SendLinkOptions = {
msg?: string;
link: string;
ttl?: number;
};
export type SendLinkResponse = {
msgId: string;
};Examples
ts
const options = {
link: "https://example.com",
};
const threadId = "0000000000000000"
api.sendLink(
options,
threadId,
ThreadType.Group
)
.then(console.log)
.catch(console.error);