Skip to main content

Send Message with Location Template

Location Template​

Official Documentation

This message format includes location information. When the sender includes an address, the recipient can tap the location button to view place details on KakaoMap.

Use Case: Announce a new store opening or introduce a menu alongside location information.

Image

Template Type Definition​

/**
* Message template that allows sharing a specific location using an address.
*
* @property address Address of the location to share. Example) 235 Pangyo Station-ro, Bundang-gu, Seongnam-si, Gyeonggi-do
* @property addressTitle Title used in the map view within KakaoTalk. Example) Kakao Pangyo Office
* @property content Content information describing the location
* @property social Social information about the content, such as the number of comments and likes
* @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 1 button, the view button on the right position is fixed)
* @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 KakaoLocationTemplate {
address: string;
content: KakaoTemplateContent;
addressTitle?: string;
social?: KakaoTemplateSocial;
buttons?: KakaoTemplateButton[];
buttonTitle?: string;
}

Send Message to Myself​

Use sendLocationTemplateToMe to send a template message to yourself.

export function sendLocationTemplateToMe(params: {
template: KakaoLocationTemplate;
})
  • template: The template object.

Send Message to Friends​

Use sendLocationTemplateToFriends to send a template message to your friends.

export function sendLocationTemplateToFriends(params: {
template: KakaoLocationTemplate;
receiverUuids: string[];
includeFailureInfo?: boolean;
})

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.