Last active
November 22, 2023 08:24
-
-
Save antimech/31560625c1e375d21a8834d4bab2ae93 to your computer and use it in GitHub Desktop.
BotMan 2.0 + Laravel: Telegram Bot user profile picture snippet. The user have to `/start` the bot first.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$userId = 16246463; | |
// Get a list of profile pictures for a user | |
$userProfilePictures = $this->bot->sendRequest('getUserProfilePhotos', [ | |
'user_id' => $userId, | |
]); | |
info($userProfilePictures); | |
$fileId = 'AgADAgADx7IxG7_m9wABEsX9bK0-UTeLuLcOAARCx8W22ekEAnHtAgABAg'; | |
// Prepare the profile picture file | |
$profilePictureFile = $this->bot->sendRequest('getFile', [ | |
'file_id' => $fileId | |
]); | |
info($profilePictureFile); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment