Layer 224
AuthImportAuthorization
Logs in a user using a key transmitted from his native data-center.
method
Users
Bots
auth.importAuthorization#a57a7dad id:long bytes:bytes = auth.Authorization;
Parameters
| Name | Type | Description |
|---|---|---|
| Id | long | User ID |
| Bytes | bytes | Authorization key |
Returns
auth.AuthorizationGogram Example
// AuthImportAuthorization - positional arguments result, err := client.AuthImportAuthorization(int64(1234567890), []byte{0x01, 0x02, 0x03}) if err != nil { // handle error } // result is *tg.AuthAuthorization
Possible Errors
| Code | Type | Description |
|---|---|---|
| 400 | AUTH_BYTES_INVALID | The provided authorization is invalid. |
| 400 | USER_ID_INVALID | The provided user ID is invalid. |