1. Home
  2. Kore.ai Conversational Platform
  3. SDKs & APIs
  4. Mobile SDK Push Notification

Mobile SDK Push Notification

Kore.ai supports sending push notifications to mobile devices over 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 updates as push notifications to the devices.

Registering for Push Notification

  1. On the Create APP screen, click the Enable checkbox.
  2. In the box below the checkbox, enter a URL to which the push notification should be sent.

User Device Registration

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.

Subscription API

  • Endpoint
    POST https://bots.kore.ai/api/users/:userId/sdknotifications/subscribe
  • Authorization Header
    authorization: “bearer xxxxxxxxxxxxxxx”
  • Payload
    {deviceId : , (required)
    osType : ios  / android  (required)
    }
    
  • Sample Request
    curl -X POST \
      https://bots.kore.ai/api/users/u-46b5fdXXXXXXXXX-4b85347a38ea/sdknotifications/subscribe \
      -H 'authorization: bearer jmABumfQUt8AaMXXXXXXXXXXXXXXXXXz0hsvVI' \
      -H 'content-type: application/json' \
      -d '  {
             "deviceId" : "device123",
             "osType" : "ios"
              }'
    

Unsubscription API

  • Endpoint
    DELETE https://bots.kore.ai/api/users/:userId/sdknotifications/unsubscribe
  • Authorization Header
    authorization: “bearer xxxxxxxxxxxxxxx”
  • Payload
         {deviceId : , (required)
          osType : ios  / android  (required)
         }
    
  • Sample Request
    curl -X DELETE \
      https://bots.kore.ai/api/users/u-46b5fdXXXXXXXXX-4b85347a38ea/sdknotifications/unsubscribe \
      -H 'authorization: bearer jmABumfQUt8AaMXXXXXXXXXXXXXXXXXz0hsvVI' \
      -H 'content-type: application/json' \
      -d '  {
             "deviceId" : "device123",
             "osType" : "ios"
             }'
    
Was this article helpful to you? Yes No