Skip to main content

Send location

Sends geographic coordinates to a chat or channel

Function SendLocation(Val Token, Val Latitude, Val Longitude, Val UserID, Val SendingToChannel) Export

ParameterCLI optionTypeRequiredDescription
Token--tokenStringToken
Latitude--latString, NumberGeographic latitude
Longitude--longString, NumberGeographic longitude
UserID--userString, NumberUser ID. For channel > administrator, for bot > recipient
SendingToChannel--ischannelBooleanSending to channel or bot chat

Returns: Map Of KeyAndValue - serialized JSON response from Viber


1C:Enterprise/OneScript code example
    Latitude  = "48.87373649724122";
Longitude = "2.2954639195323967";

UserID = "d3jxe61Z4W73nmNkjYGgZg==";
Token = "523b5b25ed27e6ec-fdf013e4...";
SendingToChannel = False;

Result = OPI_Viber.SendLocation(Token, Latitude, Longitude, UserID, SendingToChannel);

UserID = "tMNGhftyUPrB3r1lD+bT4g==";
Token = "523b58ba82afffaa-7ef3b426...";
SendingToChannel = True;

Result = OPI_Viber.SendLocation(Token, Latitude, Longitude, UserID, SendingToChannel);
    oint viber SendLocation \
--token "***" \
--lat "48.87373649724122" \
--long "2.2954639195323967" \
--user "tMNGhftyUPrB3r1lD+bT4g==" \
--ischannel true
Result
{
"status": 0,
"status_message": "ok",
"message_token": 6024682614229977927,
"chat_hostname": "SN-CHAT-03_",
"billing_status": 3
}