Skip to main content

photos.getUserPhotos

Returns the list of user photos.

func (c *Client) PhotosGetUserPhotos(ctx context.Context, request *PhotosGetUserPhotosRequest) (PhotosPhotosClass, error)

Calling this method

client.Run(ctx, func(ctx context.Context) error {
api := client.API()

res, err := api.PhotosGetUserPhotos(ctx, &tg.PhotosGetUserPhotosRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // PhotosPhotosClass
return nil
})

Parameters

NameTypeRequiredDescription
UserIDInputUserClassyesUser ID
OffsetintyesNumber of list elements to be skipped
MaxIDint64yesIf a positive value was transferred, the method will return only photos with IDs less than the set one. This parameter is often useful when refetching file references », as in conjuction with limit=1 and offset=-1 the photo object with the id specified in max_id can be fetched.
LimitintyesNumber of list elements to be returned

Returns

PhotosPhotosClass

Possible errors

CodeTypeDescription
400MAX_ID_INVALIDThe provided max ID is invalid.
400MSG_ID_INVALIDInvalid message ID provided.
400USER_ID_INVALIDThe provided user ID is invalid.

References