yoeun
yoeun

Reputation: 41

How to get friend's list and friend's profile on line api using php or shell script?

I want to get friends, their profiles and user id to send message through line api on my line account.

Here is the line but I can't understand: https://developers.line.me/in_app_web/api-reference#getting_friend_profiles

Upvotes: 4

Views: 9671

Answers (2)

Cray Kao
Cray Kao

Reputation: 573

LINE API supports user to get the user IDs of users who have added the LINE official account as a friend (followers).

HTTP request GET https://api.line.me/v2/bot/followers/ids

get the user IDs of users who have added the LINE official account as a friend (followers).

HTTP request

GET https://api.line.me/v2/bot/followers/ids

Shell script example

curl -v -X GET https://api.line.me/v2/bot/followers/ids? \
-H 'Authorization: Bearer {channel access token}'

Please beware of the feature is available only to verified or premium accounts.

Upvotes: 2

Mark Mishyn
Mark Mishyn

Reputation: 4151

You can check following links in LINE documentation:

List of followers IDs (followers are friends): https://devdocs.line.me/en/#get-follower-ids (available only for LINE partners)

User's details: https://devdocs.line.me/en/#getting-user-profiles

Upvotes: 1

Related Questions