Skip to main content

phone.setCallRating

Rate a call, returns info about the rating message sent to the official VoIP bot, see here » for more info on the full flow.

func (c *Client) PhoneSetCallRating(ctx context.Context, request *PhoneSetCallRatingRequest) (UpdatesClass, error)

Calling this method

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

res, err := api.PhoneSetCallRating(ctx, &tg.PhoneSetCallRatingRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // UpdatesClass
return nil
})

Parameters

NameTypeRequiredDescription
UserInitiativeboolWhether the user decided on their own initiative to rate the call, must NOT be set if rating was requested by the server with phoneCallDiscarded.need_rating.
PeerInputPhoneCallyesThe call to rate
RatingintyesRating in 1-5 stars
CommentstringyesAn additional comment with problem hashtags, see here » for more info on the full flow.

Returns

UpdatesClass

Possible errors

CodeTypeDescription
400CALL_PEER_INVALIDThe provided call peer object is invalid.

References