{"_id":"59550daf7a147f001b918abd","project":"54eb50e5615ffc1900305a16","version":{"_id":"54eb63b859b1172100334fae","project":"54eb50e5615ffc1900305a16","forked_from":"54eb63a1867e1917009b711d","__v":28,"createdAt":"2015-02-23T17:30:32.501Z","releaseDate":"2015-02-23T17:30:32.501Z","categories":["54eb63b959b1172100334faf","54eb63b959b1172100334fb0","54eb63b959b1172100334fb1","54eb63b959b1172100334fb2","54ed8dd4ab373e2300f50eae","54ed99b2ab373e2300f50ede","55153a6de68daa2f00cff838","551546edbc466623002afe72","5515472ac28d6125001b8884","55154749c28d6125001b8885","555d9b4106dfec0d00d38ea7","5613e06e433e5735007c7708","5624bbb785a31117001c5403","56669e857cc81e0d00253f8e","568b8d837a42220d00498311","56a632277ef6620d00e2f18a","56d8147c3eb4dd0b00201aac","57a9ce2fac6db30e000d7efd","57a9cf4e944ea60e00dc3f74","58172386715dce0f00da4aa0","582dc59ee1b8692300c0dd03","589b19b4fec2730f0082e040","58b04a023529383900a759b5","58b92d1598157a0f004869bf","592e7685c58275000f20174f","59392839e376d4002f8a0474","59393064e376d4002f8a05a1","5947ae0d4005e2000f3a4fec","594a74df1d1de5001ab3517a","5954bc387a147f001b918915","59b8eeeb707542001076d3b6"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1"},"category":{"_id":"5954bc387a147f001b918915","project":"54eb50e5615ffc1900305a16","version":"54eb63b859b1172100334fae","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2017-06-29T08:37:12.853Z","from_sync":false,"order":7,"slug":"omni-chat","title":"OMNI Chat"},"user":"57a98d832242630e00cc8df7","__v":0,"parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2017-06-29T14:24:47.286Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"settings":"","results":{"codes":[]},"auth":"required","params":[],"url":""},"isReference":false,"order":4,"body":"Don’t miss the opportunity to connect your business with over 800 million users in 193 countries worldwide over Viber’s Public Accounts!\n\nChoose from a variety of rich messaging options to instantly reach your customers over a channel they already love and they can reach you as they would reach their friends. \nInteractions look and feel as simple and native as their regular Viber conversations. Your users will enjoy the effortless, intimate experience that brings your brand closer to their world.\n[block:api-header]\n{\n  \"title\": \"Viber account types\"\n}\n[/block]\nThere are two account types that support Viber messaging: **Viber Service Messages Account** and **Viber Public Accounts**.\n\n**Viber Service Messages Account** allows you to use Viber's messaging platform to send targeted messages to your users at a competitive cost and high efficiency.\nIt is used to send Viber messages as a part of our [OMNI experience](/docs/omni-channel-viber-example). To open an account you need to apply [here](https://www.viber.com/viber-for-business).\n\nA **Viber Public Account** allows businesses, brands and public figures to interact and form connections with Viber users around the globe. As a channel that encourages both engagement and personal connections, Public Accounts can be used for a wide variety of purposes - including sales, marketing, support, announcements and more.\n\nFor setting up a Viber Public Account, follow the steps described [here](https://support.viber.com/customer/portal/articles/2733413-create-a-public-account).\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Integration setup\"\n}\n[/block]\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/b236edb-integration.png\",\n        \"integration.png\",\n        320,\n        98,\n        \"#e4dcd5\"\n      ]\n    }\n  ]\n}\n[/block]\nTo start sending messages over Viber Public Accounts, first you need to register it on Infobip's platform. This is done by adding the Viber Public Accounts integration to the application you have already created here. Use **Authentication token** as a value of `authenticationToken` parameter.\n\nThe authentication token (also known as the application key) is a unique and secret account identifier. It is used to authenticate requests made inside the Public Accounts API and to prevent unauthorized persons from sending requests on behalf of a Public Account. You will need this token during the integration process.\n\nThe authentication token is generated upon Public Account creation and can be viewed by the account admins on the \"edit info\" screen of their Public Account.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/c04c008-viber_token.PNG\",\n        \"viber_token.PNG\",\n        640,\n        1136,\n        \"#7971b3\"\n      ]\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"Authentication token\",\n  \"body\": \"Copy and save your **Authentication token** somewhere handy as you will need it in the next steps.\"\n}\n[/block]\nNote: Failing to send the authentication token in the header will result in an error with the \"missing auth_token\" message.\n\n###Request example\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"POST /omnichat/1/applications/0F3C3F29829FAB88714BA205BEC6D28F/integrations/viber HTTP/1.1\\nHost: api.infobip.com\\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\nContent-Type: application/json\\n\\n{\\n  \\\"publicAccount\\\": {\\n    \\\"authenticationToken\\\":\\\"...\\\"\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n###Response\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"publicAccount\\\": {\\n    \\\"id\\\": \\\"pa:1234...\\\",\\n    \\\"authenticationToken\\\": \\\"...\\\",\\n    \\\"name\\\": \\\"Public Account Name\\\",\\n    \\\"imageUrl\\\": \\\"https://...\\\"\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n**That's it!** You are now ready to send test messages by using [Send message](doc:omni-chat-send-message) API method.\n\nEvery message we receive from your subscriber will be forwarded to the URL you provided and is described in more details in the [Receive message](/docs/omni-chat-receive-message) section.\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"How can my organization contact people over Viber Public Accounts?\",\n  \"body\": \"Users can easily discover the business that is relevant to their interests, needs, personal networks and location as shown below.\"\n}\n[/block]\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/97a051d-viber_optin.PNG\",\n        \"viber_optin.PNG\",\n        814,\n        1016,\n        \"#ebf8f8\"\n      ],\n      \"sizing\": \"full\"\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"omni-chat-viber-integration","type":"basic","title":"Viber integration"}
Don’t miss the opportunity to connect your business with over 800 million users in 193 countries worldwide over Viber’s Public Accounts! Choose from a variety of rich messaging options to instantly reach your customers over a channel they already love and they can reach you as they would reach their friends. Interactions look and feel as simple and native as their regular Viber conversations. Your users will enjoy the effortless, intimate experience that brings your brand closer to their world. [block:api-header] { "title": "Viber account types" } [/block] There are two account types that support Viber messaging: **Viber Service Messages Account** and **Viber Public Accounts**. **Viber Service Messages Account** allows you to use Viber's messaging platform to send targeted messages to your users at a competitive cost and high efficiency. It is used to send Viber messages as a part of our [OMNI experience](/docs/omni-channel-viber-example). To open an account you need to apply [here](https://www.viber.com/viber-for-business). A **Viber Public Account** allows businesses, brands and public figures to interact and form connections with Viber users around the globe. As a channel that encourages both engagement and personal connections, Public Accounts can be used for a wide variety of purposes - including sales, marketing, support, announcements and more. For setting up a Viber Public Account, follow the steps described [here](https://support.viber.com/customer/portal/articles/2733413-create-a-public-account). [block:api-header] { "type": "basic", "title": "Integration setup" } [/block] [block:image] { "images": [ { "image": [ "https://files.readme.io/b236edb-integration.png", "integration.png", 320, 98, "#e4dcd5" ] } ] } [/block] To start sending messages over Viber Public Accounts, first you need to register it on Infobip's platform. This is done by adding the Viber Public Accounts integration to the application you have already created here. Use **Authentication token** as a value of `authenticationToken` parameter. The authentication token (also known as the application key) is a unique and secret account identifier. It is used to authenticate requests made inside the Public Accounts API and to prevent unauthorized persons from sending requests on behalf of a Public Account. You will need this token during the integration process. The authentication token is generated upon Public Account creation and can be viewed by the account admins on the "edit info" screen of their Public Account. [block:image] { "images": [ { "image": [ "https://files.readme.io/c04c008-viber_token.PNG", "viber_token.PNG", 640, 1136, "#7971b3" ] } ] } [/block] [block:callout] { "type": "warning", "title": "Authentication token", "body": "Copy and save your **Authentication token** somewhere handy as you will need it in the next steps." } [/block] Note: Failing to send the authentication token in the header will result in an error with the "missing auth_token" message. ###Request example [block:code] { "codes": [ { "code": "POST /omnichat/1/applications/0F3C3F29829FAB88714BA205BEC6D28F/integrations/viber HTTP/1.1\nHost: api.infobip.com\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\nContent-Type: application/json\n\n{\n \"publicAccount\": {\n \"authenticationToken\":\"...\"\n }\n}", "language": "json" } ] } [/block] ###Response [block:code] { "codes": [ { "code": "{\n \"publicAccount\": {\n \"id\": \"pa:1234...\",\n \"authenticationToken\": \"...\",\n \"name\": \"Public Account Name\",\n \"imageUrl\": \"https://...\"\n }\n}", "language": "json" } ] } [/block] **That's it!** You are now ready to send test messages by using [Send message](doc:omni-chat-send-message) API method. Every message we receive from your subscriber will be forwarded to the URL you provided and is described in more details in the [Receive message](/docs/omni-chat-receive-message) section. [block:callout] { "type": "info", "title": "How can my organization contact people over Viber Public Accounts?", "body": "Users can easily discover the business that is relevant to their interests, needs, personal networks and location as shown below." } [/block] [block:image] { "images": [ { "image": [ "https://files.readme.io/97a051d-viber_optin.PNG", "viber_optin.PNG", 814, 1016, "#ebf8f8" ], "sizing": "full" } ] } [/block]