1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-03-25 21:39:21 +02:00
Vitaly the Alpaca (bot) 1dd489de49 Main build (Jenkins)
2024-10-04 13:35:56 +03:00

1.6 KiB

sidebar_position
2

Send image

Sends an image to a chat or channel

Function SendImage(Val Token, Val URL, Val UserID, Val SendingToChannel, Val Description = "") Export

Parameter CLI option Type Description
Token --token String Token
URL --picture String Image URL
UserID --user String, Number User ID. For channel > administrator, for bot > recipient
SendingToChannel --ischannel boolean Sending to channel or bot chat
Description --description String Image annotation

Returns: Map Of KeyAndValue - serialized JSON response from Viber


    Description = "TestMessage";
    URL         = "https://openyellow.neocities.org/test_data/picture.jpg";

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

    Result = OPI_Viber.SendImage(Token, URL, UserID, SendingToChannel, Description);

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

    Result = OPI_Viber.SendImage(Token, URL, UserID, SendingToChannel, Description);
    
  oint viber SendImage --token %token% --picture %picture% --user "tMNGh111111111D+bT4g" --ischannel %ischannel% --description %description%

{
 "status": 0,
 "status_message": "ok",
 "message_token": 6021226526100833724,
 "chat_hostname": "SN-CHAT-02_",
 "billing_status": 3
}