Send Message with Text Template
Text Template
This message format contains only text.
Use Case: Send detailed information in a long message or create a simple text-only message.

Template Type Definition
/**
* Basic template class for text-based messages.
*
* @property text Text to include in the message (up to 200 characters)
* @property link Link information for moving when the content is clicked
* @property buttons Button list. Used when you want to change the button title and the link, or when you want to use two buttons. (Up to 2 buttons)
* @property buttonTitle Set to change the default button title "Learn more". If used, the link to move when the button is clicked will be the value entered in the content
*/
export interface KakaoTextTemplate {
text: string;
link: KakaoTemplateLink;
buttons?: KakaoTemplateButton[];
buttonTitle?: string;
}
Send Message to Myself
Use sendTextTemplateToMe to send a template message to yourself.
export function sendTextTemplateToMe(params: {
template: KakaoTextTemplate;
})
template: The template object.
Send Message to Friends
Use sendTextTemplateToFriends to send a template message to your friends.
export function sendTextTemplateToFriends(params: {
template: KakaoTextTemplate;
receiverUuids: string[];
includeFailureInfo?: boolean;
})
template: The template object.receiverUuids: List of friend uuids to send the message to. You can obtain these from the social package's Select KakaoTalk Friends or Get KakaoTalk Friends.
Pass includeFailureInfo: true to receive successful UUIDs and failures grouped by error. Omit it to receive the successful UUID array. See message results.
info
Refer to Component Types for detailed component types.
If you encounter any issues, refer to Troubleshooting.