-
Notifications
You must be signed in to change notification settings - Fork 642
Getting user profile
moznion edited this page Feb 25, 2017
·
1 revision
You can get user's profile by the user_id
.
https://devdocs.line.me/en/#bot-api-get-profile
$bot = new \LINE\LINEBot(new CurlHTTPClient('your-channel-token'), [
'channelSecret' => 'your-channel-secret'
]);
$res = $bot->getProfile('user-id');
if ($res->isSucceeded()) {
$profile = $res->getJSONDecodedBody();
$displayName = $profile['displayName'];
$statusMessage = $profile['statusMessage'];
$pictureUrl = $profile['pictureUrl'];
}