contacts.resolveUsername
Find a user, chat or channel by name
Determines who is using the public name and returns the identifier along with associated data.
| Name | Type | Required | Description |
|---|---|---|---|
username | string | Yes | Public name of the user, chat or channel. |
referer | string | No | Source ID from the referral link, if available. |
Responses
contacts.ResolvedPeer
MTProto RPC
- 400 · CONNECTION_LAYER_INVALID — Layer invalid.
- 400 · STARREF_EXPIRED — The specified referral link is invalid.
- 400 · USERNAME_INVALID — The provided username is not valid.
- 400 · USERNAME_NOT_OCCUPIED — The provided username is not occupied.