Send Message with Calendar Template
Calendar Template
This message format includes public schedule or subscription calendar information from Kakao Calendar. It provides the functionality to add the public schedule or subscription calendar of a Kakao Talk Channel to the user's Kakao Calendar. Messages can only be sent for the public schedule or subscription calendar of the Kakao Talk Channel connected to the service app.
Use Case: This is used to encourage users to add a service's public schedule to their calendar or subscribe to a service's calendar via Kakao Talk messages.
Template Type Definition
/**
* Message format including subscription calendar or public schedule information from Kakao Calendar.
* It provides the functionality to add the subscription calendar or public schedule of a Kakao Talk Channel to the user's Kakao Calendar.
*
* @property id ID of the subscription calendar or public schedule
* @property idType Type of the ID, either event (public schedule) or calendar (subscription calendar)
* @property content Content information describing the schedule
* @property buttons Button list. When you want to change the link besides the title of the default button. (Up to 1 button, the view button on the right position is fixed)
*/
export interface KakaoCalendarTemplate {
id: string;
idType: 'event' | 'calendar';
content: KakaoTemplateContent;
buttons?: KakaoTemplateButton[];
}
Send Message to Myself
sendCalendarTemplateToMe
to send a template message to yourself.
export function sendCalendarTemplateToMe(params: {
template: KakaoCalendarTemplate;
})
template
: The template object.
Send Message to Friends
Use sendCalendarTemplateToFriends
to send a template message to your friends.
export function sendCalendarTemplateToFriends(params: {
template: KakaoCalendarTemplate;
receiverUuids: string[];
})
template
: The template object.receiverUuids
: List of uuids of friends to whom the message will be sent. You can obtain this from the social package's Select KakaoTalk Friends or Get KakaoTalk Friends.
Refer to Component Types for detailed component types.
If you encounter any issues, refer to Troubleshooting.