telegram api method · layer 229 · #91cd32a8

photos.getUserPhotos

usable by users and bots

Returns the list of user photos.

definition

photos.getUserPhotos#91cd32a8 user_id:InputUser offset:int max_id:long limit:int = photos.Photos;

parameters

nametypedescription
user_idInputUserUser ID
offsetintNumber of list elements to be skipped
max_idlongIf 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.
limitintNumber of list elements to be returned

returns

photos.Photos

errors (6)

codeerrordescription
400BUSINESS_CONNECTION_NOT_ALLOWEDThis method was invoked over a business connection using invokeWithBusinessConnection, but either (1) we're a user, and users cannot invoke methods over a business connection; (2) we're a bot, but business mode was disabled in @botfather or (3); we're a bot, but this method cannot be invoked over a business connection.
400CHANNEL_PRIVATEYou haven't joined this channel/supergroup.
400MAX_ID_INVALIDThe provided max ID is invalid.
400MSG_ID_INVALIDInvalid message ID provided.
400USER_ID_INVALIDThe provided user ID is invalid.
401AUTH_KEY_UNREGISTEREDThe specified authorization key is not registered in the system (for example, a PFS temporary key has expired).

history

present in layers 2–229 · constructor id changed 1×

idlayers
#b7ee553c2–23
#91cd32a846–229