Document toolboxDocument toolbox

Implement push notifications in a mobile app based on Smart ID Mobile SDK

This article describes what you need to consider when implementing your own mobile app using Smart ID Mobile SDK and you want to get push notifications triggered from Smart ID Digital Access component. 

  1. Your app must register its current device token together with a list of currently installed profile IDs (push IDs), using a Device registration API that you must implement in your organization's notification server. The mandatory data is described below.

  2. Smart ID Digital Access component will post requests for all known profile IDs by using the Push API described below. This data can be used in push notifications and handled in your mobile app. This logic must also be implemented by your organization, both the notification server and the mobile app.  

This image shows the communication between the mobile app, Smart ID Messaging and Smart ID Digital Access component. 



Device registration API

Your organization's notification server must know the correlation between the profile ID (push ID) and the vendor and device ID. Therefore you must implement a Device registration API with the following details, which the app must provide: 

  • profileID - this equals pushId in the Push API 

  • OS:

    • iOS

    • Android

  • deviceID:

    • For iOS: device token

    • For Android: device registration token



For more information, see 

Push API

Smart ID Digital Access component will send a REST (POST) request to your company's notification server with the following data which can be used in the push notifications:

Description

Sends a push notification to the Smart ID Mobile App. 

Method

POST

JSON data

JSON data
{   "messageId": "7bcc1708-be42-48f4-ac67-c76afddae805",   "pushId": " 74db355b-ecec-48b4-a4d8-9e6f13084bab",   "requestor": "Acme",   "type": "AUTH" }



JSON schema

JSON schema
{    "type":"object",    "required":[       "pushId",       "requestor",       "type",       "messageId"    ],    "properties":{       "pushId":{          "type":"string",          "description":"Globally unique push identifier. Make sure that the app uses the same id. E.g. base64(mbox-url)"       },       "requestor":{          "type":"string",          "description":"Requestor of the push notification"       },       "type":{          "type":"string",          "enum":[             "AUTH",             "SIGN"          ],          "description":"Type of push"       },       "messageId":{          "type":"string",          "description":"Id of message which notification is sent for"       },       "timeToLive":{          "type":"integer",          "description":"OPTIONAL - Time to live for notification (will override configured value)"       }            } }







Copyright 2024 Technology Nexus Secured Business Solutions AB. All rights reserved.
Contact Nexus | https://www.nexusgroup.com | Disclaimer | Terms & Conditions