Share 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[];
}
Usage
shareCalendarTemplate
to share a template message.
export function shareCalendarTemplate(params: {
template: KakaoCalendarTemplate;
useWebBrowserIfKakaoTalkNotAvailable?: boolean;
serverCallbackArgs?: Record<string, string>;
})
template
: The template object.useWebBrowserIfKakaoTalkNotAvailable
: Specifies whether to use a web browser for sharing when KakaoTalk is not available. The default value istrue
.serverCallbackArgs
: Server callback arguments. Each value must be passed as a string.
info
Refer to Component Types for detailed component types.
If you encounter any issues, refer to Troubleshooting.