Skip to main content

users.getUsers

Returns basic user info according to their identifiers.

func (c *Client) UsersGetUsers(ctx context.Context, id []InputUserClass) ([]UserClass, error)

Calling this method

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

res, err := api.UsersGetUsers(ctx, id)
if err != nil {
return err
}
_ = res // []UserClass
return nil
})

Parameters

NameTypeRequiredDescription
ID[]InputUserClassyesList of user identifiers

Returns

[]UserClass

Possible errors

CodeTypeDescription
400CHANNEL_INVALIDThe provided channel is invalid.
400CHANNEL_MONOFORUM_UNSUPPORTEDMonoforums do not support this feature.
400CHANNEL_PRIVATEYou haven't joined this channel/supergroup.
400FROM_MESSAGE_BOT_DISABLEDBots can't use fromMessage min constructors.
400MSG_ID_INVALIDInvalid message ID provided.
400PEER_ID_INVALIDThe provided peer id is invalid.
400USER_BANNED_IN_CHANNELYou're banned from sending messages in supergroups/channels.

References