Skip to main content
Version: 1.0.2

Initiate Device Registration

Mobile device registration in PL is done through the InitiateRegisterDevice API and CompleteRegisterDevice API.

  1. After getting credentials from the end user in Mobile App registration page, invoke the InitiateRegisterDevice API

  2. On invoking InitiateRegisterDevice API,

    • the ledger validates the given end user credentials and sends an OTP to end user registered email id

    • the API returns an OTP_TOKEN to Mobile App

  3. After getting the OTP from the end user, generate a private and public key pair in Mobile device app

  4. Store private key securely in the mobile device and invoke the CompleteRegisterDevice API with OTP, OTP_TOKEN, PublicKey, DeviceInfo details

note

OTP, OTP_TOKEN, PublicKey will be used to complete the Mobile device registration in CompleteRegisterDevice API.

Method: POST

{{URL}}/jsonrpc

Headers

NameValue
Content-Typeapplication/json

Example

Payload Parameters
ParameterDescription

method

Mandatory

String

API method that is being called to initiate device registration through key service

Constant value: "KeyService.InitiateRegisterDevice"

id

Mandatory

String

Unique ID of API request

Sample value: "1"

params

Mandatory

Object

api

Mandatory

Object

signature

Mandatory

String

Signature for request validation

Sample value: "signature"

keyId

Mandatory

String

API key used for request authentication

Sample value: "ApplicationKeyId"

credential

Mandatory

String

API credential provided by NetXD

Sample value: "Credential"

payload

Mandatory

Object


curl --location --globoff '{{URL}}/jsonrpc' \
--header 'Content-Type: application/json' \
--data '{"method":"KeyService.InitiateRegisterDevice","id":"1","params":{"api":{"signature":"{{signature}}","keyId":"{{ApplicationKeyId}}","credential":"{{Credential}}"},"payload":{}}}'

Body


{
"method": "KeyService.InitiateRegisterDevice",
"id": "1",
"params": {
"api": {
"signature": "{{signature}}",
"keyId": "{{ApplicationKeyId}}",
"credential": "{{Credential}}"
},
"payload": {}
}
}

Response: 200

Response Parameters
ParameterDescription

id

String

Response ID echoed from the request ID

Sample value: "1"

result

Object

StatusEnum

Status of the initiation of device registration

Possible Values:

Sample value: SUCCESS

OtpTokenString

Token generated during OTP generation process

Sample value: c1a8247b6afe4ee081e66935ef8c6660


{
"id": "1",
"result": {
"Status": "SUCCESS",
"OtpToken": "c1a8247b6afe4ee081e66935ef8c6660"
}
}