Telegram APIContacts
contacts.resolveUsername
Resolve a @username to get peer info
Authorization
bearerAuth AuthorizationBearer <token>
In: header
Path Parameters
workspaceId*string
Workspace ID
accountId*string
Telegram account ID
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
params*
Resolve a @username to get peer info
Response Body
application/json
application/json
curl -X POST "https://example.com/workspaces/string/telegram-accounts/string/call/contacts.resolveUsername" \ -H "Content-Type: application/json" \ -d '{ "params": { "username": "string" } }'{ "result": { "_": "contacts.resolvedPeer", "peer": { "_": "peerUser", "userId": 0 }, "chats": [ { "_": "chatEmpty", "id": 0 } ], "users": [ { "_": "userEmpty", "id": 0 } ] }}