Skip to main content

Refresh token

Update token by refresh token

Function RefreshToken(Val ClientID, Val ClientSecret, Val Refresh) Export

ParameterCLI optionTypeRequiredDescription
ClientID--clientidStringClient ID from app settings
ClientSecret--clientsecretStringClient secret from app settings
Refresh--refreshStringRefresh token

Returns: Map Of KeyAndValue - serialized JSON of answer from Bitrix24 API


1C:Enterprise/OneScript code example
    ClientID     = "local.6667fc928a50a9.70414732";
ClientSecret = "ZeKyeYIgy2NsHZqsIHY6GfG1V...";
Refresh = "1fcd6767006e9f06006b12e400000001000...";

Result = OPI_Bitrix24.RefreshToken(ClientID, ClientSecret, Refresh);
    oint bitrix24 RefreshToken \
--clientid "***" \
--clientsecret "***" \
--refresh "***"
Result
{
"access_token": "6b2e0667006e9f06006b12e4000000010000072c4914d2a629a27f8e468fd6a8ba64ff",
"expires": 1728458347,
"expires_in": 3600,
"scope": "app",
"domain": "oauth.bitrix.info",
"server_endpoint": "https://oauth.bitrix.info/rest/",
"status": "L",
"client_endpoint": "https://b24-ar17wx.bitrix24.by/rest/",
"member_id": "00168f0dd11ff00b4aeb8ce5befaa139",
"user_id": 1,
"refresh_token": "5bad2d67006e9f06006b12e40000000100000735b526f7211741a7e65fac266c482aca"
}