Skip to main content

Send Message with Custom Template

Custom Template

Refer to the Official Documentation for details on using custom templates to send messages via KakaoTalk.

Send Message to Myself

You can send a message using the sendCustomTemplateToMe() function.

This function is defined as follows:

export function sendCustomTemplateToMe(params: {
templateId: number;
templateArgs?: Record<string, string>;
})
  • templateId: The message template specified in the console.
  • templateArgs: Template arguments. All values must be passed as strings.

Send Message to Friends

You can send a message using the sendCustomTemplateToFriends() function.

This function is defined as follows:

export function sendCustomTemplateToFriends(params: {
templateId: number;
templateArgs?: Record<string, string>;
receiverUuids: string[];
})
  • templateId: The message template specified in the console.
  • templateArgs: Template arguments. All values must be passed as strings.
  • receiverUuids: List of uuids of friends to whom the message will be sent. You can obtain these from the social package's Select KakaoTalk Friends or Get KakaoTalk Friends.
info

Refer to the Component Types for detailed component types.

If you encounter any issues, refer to the Troubleshooting section.