Get KakaoTalk Friends
Get KakaoTalk Friends
info
To use the API, the user must have agreed to Kakao login and related consent items.
The picker and get friends list API can only be used in apps granted permission.
Fetches the KakaoTalk friends list of the currently logged-in user. You can optionally specify the sort order of the friends list and the number of friends per page when making a request. If requested without parameters, the request is sent with 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;
uuid: string;
profileNickname: string;
profileThumbnailImage?: string;
favorite?: boolean;
allowedMsg?: boolean;
}
export interface KakaoTalkGetFriendsOptions {
offset?: number;
limit?: number;
order?: 'asc' | 'desc';
friendOrder?: 'nickname' | 'age' | 'favorite';
}