Other image formats as well as animated GIFs can be sent as URL messages or file messages Setting a Webhook Resource URL Post data ĭescription of the photo. If the user has disallowed content personalization, you will receive placeholder values. Note: This feature will work if the user has allowed “Content Personalisation” (More → Privacy → personal data). To set the request, pass send_name and send_photo flags with the set_webhook request. If you don’t use user names photos, please opt-out to default values. This has been updated to comply with privacy laws and allow developers who don’t make use of user names and photos as part of their service to opt out. Viber’s API allows you to receive user names and photos. To disable 1-on-1 conversation with your account you’ll need to remove your webhook – see removing your webhook below. Note that once you set your webhook the 1-on-1 conversation with your account will become available. Once a set_webhook request is sent Viber will send a callback to the webhook to check its availability and return a response to the user. This action defines the account’s webhook and the type of events the account wants to be notified about. For security reasons only URLs with valid and official SSL certificate from a trusted CA will be allowed. Setting the webhook will be done by calling the set_webhook API with a valid & certified URL. This webhook will be used for receiving callbacks and user messages from Viber. Once you have your token you will be able to set your account’s webhook. Note: Failing to send the authentication token in the header will result in an error with the missing_auth_token message. The authentication token is generated upon account creation and can be viewed by the account’s admins in the “edit info” screen of their Public Account/ bot or on the Viber Admin Panel. Each API request must include an HTTP Header called X-Viber-Auth-Token containing the account’s authentication token. It is used to authenticate request in the Viber API and to prevent unauthorized persons from sending requests on behalf of a Public Account/ bot. The authentication token (also known as application key) is a unique and secret account identifier. All API requests and callbacks mentioned in the diagram will be explained later in this document. The following diagram describes the flow of sending and receiving messages by the account. Public Accounts/ bots are currently supported on iOS and Android devices running Viber version 6.5 and above and on desktop from version 6.5.3. Setup account webhook – this needs to be done once during the account setup process to define your webhook and the type of responses you would like to receive.Each request posted to Viber by the account will need to contain the token. Once your account is created your authentication token will appear in the account’s “edit info” screen (for admins only). Account authentication token - unique account identifier used to validate your account in all API requests.Active Public Account/ bot - Create an account here.This account will automatically be set as the account administrator during the account creation process. An Active Viber account on a platform which supports Public Accounts/ bots (iOS/Android).In order to implement the API you will need the following:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |