getConnection()
Get the Telegram dashboard connection
Returns connection state and bot details for the authenticated account.
Signature
client.telegram.getConnection(options: TelegramDashboardGetConnectionOptions = {}): Promise<TelegramDashboardGetConnectionResponse>Parameters
| Name | Type | Requirement | Description |
|---|---|---|---|
acceptLanguage | string | Optional | Preferred language for human-readable API errors. Supported languages: en, ru, uk, de, it, fr, es, zh-hans, ja. Regional language tags and quality weights are accepted; unsupported or omitted values use English. |
Example
const result = await client.telegram.getConnection();Returns
TelegramConnectionResponseThe operation completed successfully.
typeTelegramConnectionResponse8fields
availablebooleanstatusstringbot_usernamestringtelegram_usernamestringlocalestringtimezonestringlinked_atstringpending_expires_atstringThrows
ApiErrorNormalized API, transport, and response processing failure.
kind: "validation"The request arguments or business rules are invalid.kind: "authentication"Authentication credentials are missing, expired, or invalid.kind: "permission"The authenticated account cannot perform this operation.kind: "network"The request could not reach ProxyRequest.kind: "unexpected"The response could not be decoded or did not match the SDK contract.
Advanced variants
client.telegram.getConnectionWithResponse(options): Promise<ApiResponse<TelegramDashboardGetConnectionResponse>>Returns response status, headers, ETag and idempotency metadata with the decoded data.
Signature
client.telegram.get_connection(*, accept_language: str | Unset=UNSET) -> TelegramConnectionResponseawait async_client.telegram.get_connection(*, accept_language: str | Unset=UNSET) -> TelegramConnectionResponseParameters
| Name | Type | Requirement | Description |
|---|---|---|---|
accept_language | str | Optional | Preferred language for human-readable API errors. Supported languages: en, ru, uk, de, it, fr, es, zh-hans, ja. Regional language tags and quality weights are accepted; unsupported or omitted values use English. |
Example
result = client.telegram.get_connection()Async example
result = await async_client.telegram.get_connection()Returns
TelegramConnectionResponseThe operation completed successfully.
classTelegramConnectionResponse8fields
availableboolstatusstrbot_usernamestrlocalestrtimezonestrtelegram_usernamestrlinked_atdatetime.datetime | Nonepending_expires_atdatetime.datetime | NoneThrows
ApiErrorNormalized API, transport, and response processing failure.
ErrorKind.VALIDATIONThe request arguments or business rules are invalid.ErrorKind.AUTHENTICATIONAuthentication credentials are missing, expired, or invalid.ErrorKind.PERMISSIONThe authenticated account cannot perform this operation.ErrorKind.NETWORKThe request could not reach ProxyRequest.ErrorKind.UNEXPECTEDThe response could not be decoded or did not match the SDK contract.
Advanced variants
client.telegram.get_connection_with_response(*, accept_language: str | Unset=UNSET) -> ApiResponse[TelegramConnectionResponse]Returns response status, headers, ETag and idempotency metadata with the decoded data.
Signature
$client->telegram()->getConnection($acceptLanguage = null, string $contentType = self::contentTypes['getConnection'][0])Parameters
| Name | Type | Requirement | Description |
|---|---|---|---|
acceptLanguage | string | Optional | Preferred language for human-readable API errors. Supported languages: en, ru, uk, de, it, fr, es, zh-hans, ja. Regional language tags and quality weights are accepted; unsupported or omitted values use English. |
Example
$result = $client->telegram()->getConnection();Returns
TelegramConnectionResponseThe operation completed successfully.
classTelegramConnectionResponse8fields
availableboolstatusstringbotUsernamestringtelegramUsernamestringlocalestringtimezonestringlinkedAtDateTimependingExpiresAtDateTimeThrows
ApiExceptionNormalized API, transport, and response processing failure.
ErrorKind::ValidationThe request arguments or business rules are invalid.ErrorKind::AuthenticationAuthentication credentials are missing, expired, or invalid.ErrorKind::PermissionThe authenticated account cannot perform this operation.ErrorKind::NetworkThe request could not reach ProxyRequest.ErrorKind::UnexpectedThe response could not be decoded or did not match the SDK contract.
InvalidArgumentExceptionA required argument is missing or violates a local SDK constraint.
local validationThe request was rejected before it was sent.
Advanced variants
$client->telegram()->getConnectionWithResponse($acceptLanguage = null, string $contentType = self::contentTypes['getConnection'][0]): \ProxyRequest\ApiResponseReturns an ApiResponse with decoded data and HTTP metadata.
$client->telegram()->getConnectionWithHttpInfo($acceptLanguage = null, string $contentType = self::contentTypes['getConnection'][0])Returns the OpenAPI Generator response tuple.
$client->telegram()->getConnectionAsync($acceptLanguage = null, string $contentType = self::contentTypes['getConnection'][0])Returns a Guzzle promise for the decoded result.
$client->telegram()->getConnectionAsyncWithHttpInfo($acceptLanguage = null, string $contentType = self::contentTypes['getConnection'][0])Returns a Guzzle promise for the response tuple.
$client->telegram()->getConnectionRequest($acceptLanguage = null, string $contentType = self::contentTypes['getConnection'][0])Builds the PSR-7 request without sending it.