1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-01-26 05:37:27 +02:00
Vitaly the Alpaca (bot) e568e207fd Main build (Jenkins)
2024-10-08 20:15:58 +03:00

1.2 KiB

sidebar_position
1

Set Webhook

IMPORTANT: Setting up Webhook is mandatory according to Viber rules. You need to have a free URL for this., which will return 200 and a genuine SSL certificate. If there is a certificate and the database is published on the server - you can use an HTTP service. Information about new messages will also be sent there Viber periodically knocks on the Webhook address, so if it is inactive, everything will stop working

Function SetWebhook(Val Token, Val URL) Export

Parameter CLI option Type Description
Token --token String Viber Token
URL --url String URL for setting up Webhook

Returns: Map Of KeyAndValue - serialized JSON response from Viber


    Token = "523b58ba82afffaa-7ef3b426...";
    URL   = "http://api.athenaeum.digital/hs/viber";

    Result = OPI_Viber.SetWebhook(Token, URL);
    
  oint viber SetWebhook --token %token% --url %url%

{
 "status": 1,
 "status_message": "URL not valid or not HTTPS",
 "chat_hostname": "SN-CHAT-02_"
}