Skip to main content

Get KakaoTalk Friends

Official Documentation

info

To use the API, the user must have completed Kakao login and agreed to the related consent items.

Only apps granted permission can use the picker and friends list APIs.

The API fetches the current user's KakaoTalk friends list. You can optionally specify the sort order and number of friends per page. Requests without parameters use the default settings.

Usage​

You can fetch the friends list using getFriends().

It is defined as follows:

export function getFriends(params: {
options?: KakaoTalkGetFriendsOptions;
}): Promise<KakaoTalkGetFriendsResult>

The types used are as follows:

/**
* KakaoTalk Friend
*
* @property id Member number
* @property uuid Unique ID to send messages. This information may change depending on the user's account status and is not recommended as the user identifier within the app.
* @property profileNickname Friend's nickname
* @property profileThumbnailImage Thumbnail image URL
* @property favorite Favorite status
* @property allowedMsg Whether message reception is allowed. For app-joined friends, this corresponds to feed msg. For unjoined app friends, it corresponds to invite msg.
*/
export interface KakaoTalkFriend {
id?: number | null;
uuid: string;
profileNickname?: string | null;
profileThumbnailImage?: string | null;
favorite?: boolean | null;
allowedMsg?: boolean | null;
}

export interface KakaoTalkGetFriendsOptions {
offset?: number;
limit?: number;
order?: 'asc' | 'desc';
friendOrder?: 'nickname' | 'age' | 'favorite';
}

The response includes the friends array and totalCount. beforeUrl and afterUrl contain Kakao's previous and next page URLs, or null when that page is absent. Their query parameters can help determine offset and limit for the next request.

A friend's profileNickname can be absent or null. iOS friend thumbnails use the same URL string format as the other platforms.