2019-11-16 22:32:05 +02:00
|
|
|
# getUserProfilePhotos
|
|
|
|
|
|
|
|
|
|
## Description
|
|
|
|
|
|
|
|
|
|
Use this method to get a list of profile pictures for a user. Returns a UserProfilePhotos object.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Arguments
|
|
|
|
|
|
|
|
|
|
| Name | Type | Description |
|
|
|
|
|
| - | - | - |
|
|
|
|
|
| `user_id` | `#!python3 int` | Unique identifier of the target user |
|
|
|
|
|
| `offset` | `#!python3 Optional[int]` | Optional. Sequential number of the first photo to be returned. By default, all photos are returned. |
|
2020-05-02 23:01:32 +03:00
|
|
|
| `limit` | `#!python3 Optional[int]` | Optional. Limits the number of photos to be retrieved. Values between 1-100 are accepted. Defaults to 100. |
|
2019-11-16 22:32:05 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Response
|
|
|
|
|
|
|
|
|
|
Type: `#!python3 UserProfilePhotos`
|
|
|
|
|
|
|
|
|
|
Description: Returns a UserProfilePhotos object.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
|
2020-04-11 20:15:03 +03:00
|
|
|
### As bot method
|
2019-11-16 22:32:05 +02:00
|
|
|
|
|
|
|
|
```python3
|
|
|
|
|
result: UserProfilePhotos = await bot.get_user_profile_photos(...)
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### Method as object
|
|
|
|
|
|
|
|
|
|
Imports:
|
|
|
|
|
|
2019-12-11 16:52:21 +02:00
|
|
|
- `from aiogram.methods import GetUserProfilePhotos`
|
|
|
|
|
- `from aiogram.api.methods import GetUserProfilePhotos`
|
|
|
|
|
- `from aiogram.api.methods.get_user_profile_photos import GetUserProfilePhotos`
|
2019-11-16 22:32:05 +02:00
|
|
|
|
2020-01-11 22:59:14 +02:00
|
|
|
#### In handlers with current bot
|
2019-11-16 22:32:05 +02:00
|
|
|
```python3
|
2020-01-11 22:59:14 +02:00
|
|
|
result: UserProfilePhotos = await GetUserProfilePhotos(...)
|
2019-11-16 22:32:05 +02:00
|
|
|
```
|
|
|
|
|
|
2020-01-11 22:59:14 +02:00
|
|
|
#### With specific bot
|
2019-11-16 22:32:05 +02:00
|
|
|
```python3
|
2020-01-11 22:59:14 +02:00
|
|
|
result: UserProfilePhotos = await bot(GetUserProfilePhotos(...))
|
2019-11-16 22:32:05 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
2020-01-11 22:59:14 +02:00
|
|
|
|
2019-11-16 22:32:05 +02:00
|
|
|
## Related pages:
|
|
|
|
|
|
|
|
|
|
- [Official documentation](https://core.telegram.org/bots/api#getuserprofilephotos)
|
|
|
|
|
- [aiogram.types.UserProfilePhotos](../types/user_profile_photos.md)
|