Skip to main content

Get confirmation code

Gets the confirmation code and the address of the page where it needs to be entered

Function GetConfirmationCode(Val ClientId) Export

ParameterCLI optionTypeRequiredDescription
ClientId--idStringClient id
Returns

Map Of KeyAndValue - serialized JSON response from Yandex

1C:Enterprise/OneScript code example
ClientID = "cc2ce9d60deb4975be58866d32dbe7aa";

Result = OPI_YandexDisk.GetConfirmationCode(ClientID);
oint yadisk GetConfirmationCode \
--id "cc2ce9d60deb4975be58866d32dbe7aa"
Result
{
"device_code": "33ad1575a70a4fdc8f014d7586e67e7b",
"expires_in": 300,
"interval": 5,
"user_code": "23shsepo",
"verification_url": "https://ya.ru/device"
}