{"id":18044,"date":"2018-03-20T13:23:19","date_gmt":"2018-03-20T13:23:19","guid":{"rendered":"http:\/\/developer.kore.ai\/v7-3\/?post_type=docs&#038;p=13546"},"modified":"2021-03-26T10:19:15","modified_gmt":"2021-03-26T10:19:15","slug":"mobile-sdk-push-notification","status":"publish","type":"post","link":"https:\/\/developer.kore.ai\/v7-3\/docs\/bots\/sdks\/mobile-sdk-push-notification\/","title":{"rendered":"Mobile SDK Push Notification"},"content":{"rendered":"<section class=\"l-section wpb_row height_auto\"><div class=\"l-section-h i-cf\"><div class=\"g-cols vc_row type_default valign_top\"><div class=\"vc_col-sm-12 wpb_column vc_column_container\"><div class=\"vc_column-inner\"><div class=\"wpb_wrapper\">\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<p>Kore.ai supports sending push notifications to mobile devices over the Mobile SDK channel.<\/p>\n<p>Kore mobile SDKs get embedded with the native host mobile application, which is responsible for managing push notification subscriptions with APNS and GCM provider. The Host Mobile application server needs to host a webhook to receive updates from Kore.ai. It sends these updates as push notifications to the devices.<\/p>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-separator size_small with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div>\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h3><span class=\"ez-toc-section\" id=\"Registering_for_Push_Notification\">Registering for Push Notification<\/span><\/h3>\n<ol>\n<li>On the Create APP screen, click the <strong>Enable<\/strong> checkbox.<\/li>\n<li>In the box below the checkbox, enter a URL to which the push notification should be sent.<br \/>\n<a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/15\/DIYChannelCreateAppDialog-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-13549\" src=\"\/wp-content\/uploads\/sites\/15\/DIYChannelCreateAppDialog-1.png\" alt=\"\" width=\"533\" height=\"587\" \/><\/a><\/li>\n<\/ol>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-separator size_small with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div>\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h3><span class=\"ez-toc-section\" id=\"User_Device_Registration\">User Device Registration<\/span><\/h3>\n<p>For each user who opts to receive the notification, the Mobile Application needs to send the device and user details to Kore.ai. Kore.ai sends device details and the user ID while making the webhook call.<\/p>\n<h4>Subscription API<\/h4>\n<ul>\n<li><strong>Endpoint<\/strong><br \/>\n<table>\n<tbody>\n<tr>\n<td><b>POST<\/b><\/td>\n<td>https:\/\/bots.kore.ai\/api\/users\/:userId\/sdknotifications\/subscribe<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/li>\n<li><strong>Authorization Header<\/strong><br \/>\n<code> authorization: \u201cbearer xxxxxxxxxxxxxxx\u201d <\/code><\/li>\n<li><strong>Payload<\/strong>\n<pre class=\"\">{deviceId : , (required)\r\nosType : ios  \/ android  (required)\r\n}<\/pre>\n<\/li>\n<li><strong>Sample Request<\/strong>\n<pre class=\"\">curl -X POST \\\r\n  https:\/\/bots.kore.ai\/api\/users\/u-46b5fdXXXXXXXXX-4b85347a38ea\/sdknotifications\/subscribe \\\r\n  -H 'authorization: bearer jmABumfQUt8AaMXXXXXXXXXXXXXXXXXz0hsvVI' \\\r\n  -H 'content-type: application\/json' \\\r\n  -d '  {\r\n         \"deviceId\" : \"device123\",\r\n         \"osType\" : \"ios\"\r\n          }'<\/pre>\n<\/li>\n<\/ul>\n<h4>Unsubscription API<\/h4>\n<ul>\n<li><strong>Endpoint<\/strong><br \/>\n<table>\n<tbody>\n<tr>\n<td><b>DELETE<\/b><\/td>\n<td>https:\/\/bots.kore.ai\/api\/users\/:userId\/sdknotifications\/unsubscribe<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/li>\n<li><strong>Authorization Header<\/strong><br \/>\n<code> authorization: \u201cbearer xxxxxxxxxxxxxxx\u201d <\/code><\/li>\n<li><strong>Payload<\/strong>\n<pre>     {deviceId : , (required)\r\n      osType : ios  \/ android  (required)\r\n     }<\/pre>\n<\/li>\n<li><strong>Sample Request<\/strong>\n<pre class=\"\">curl -X DELETE \\\r\n  https:\/\/bots.kore.ai\/api\/users\/u-46b5fdXXXXXXXXX-4b85347a38ea\/sdknotifications\/unsubscribe \\\r\n  -H 'authorization: bearer jmABumfQUt8AaMXXXXXXXXXXXXXXXXXz0hsvVI' \\\r\n  -H 'content-type: application\/json' \\\r\n  -d '  {\r\n         \"deviceId\" : \"device123\",\r\n         \"osType\" : \"ios\"\r\n         }'<\/pre>\n<\/li>\n<\/ul>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-separator size_small with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/section>\n","protected":false},"excerpt":{"rendered":"Kore.ai supports sending push notifications to mobile devices over the Mobile SDK channel. Kore mobile SDKs get embedded with the native host mobile application, which is responsible for managing push notification subscriptions with APNS and GCM provider. The Host Mobile application server needs to host a webhook to receive updates from Kore.ai. It sends these...","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[36],"tags":[],"class_list":["post-18044","post","type-post","status-publish","format-standard","hentry","category-sdks"],"_links":{"self":[{"href":"https:\/\/developer.kore.ai\/v7-3\/wp-json\/wp\/v2\/posts\/18044","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/developer.kore.ai\/v7-3\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/developer.kore.ai\/v7-3\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v7-3\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v7-3\/wp-json\/wp\/v2\/comments?post=18044"}],"version-history":[{"count":1,"href":"https:\/\/developer.kore.ai\/v7-3\/wp-json\/wp\/v2\/posts\/18044\/revisions"}],"predecessor-version":[{"id":20893,"href":"https:\/\/developer.kore.ai\/v7-3\/wp-json\/wp\/v2\/posts\/18044\/revisions\/20893"}],"wp:attachment":[{"href":"https:\/\/developer.kore.ai\/v7-3\/wp-json\/wp\/v2\/media?parent=18044"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/developer.kore.ai\/v7-3\/wp-json\/wp\/v2\/categories?post=18044"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/developer.kore.ai\/v7-3\/wp-json\/wp\/v2\/tags?post=18044"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}