CRMchat APIBeta
Telegram APIAccount

account.sendChangePhoneCode

POST
/workspaces/{workspaceId}/telegram-accounts/{accountId}/call/account.sendChangePhoneCode

Verify a new phone number to associate to the current account

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*

Verify a new phone number to associate to the current account

Response Body

application/json

application/json

curl -X POST "https://example.com/workspaces/string/telegram-accounts/string/call/account.sendChangePhoneCode" \  -H "Content-Type: application/json" \  -d '{    "params": {      "phoneNumber": "string",      "settings": {        "_": "codeSettings"      }    }  }'
{  "result": {    "_": "auth.sentCode",    "type": {      "_": "auth.sentCodeTypeApp",      "length": 0    },    "phoneCodeHash": "string",    "nextType": {      "_": "auth.codeTypeSms"    },    "timeout": 0  }}