Error Handling

Code ERROR Description
200 OK Request success
400 USER_NOT_FOUND User not found
400 USER_ALREADY_EXISTS userid is already exists!
401 UNAUTHORIZED Private key is incorrect

Create Account

POST /api/app/createcode
Param Type Decription

userid

Any

An unique identifier of the your system user.

pvk

String

DSA Private key
                               {
                                  "success": true,
                                  "qr": "https://dsa.disa.com/api/qr/1572325132793.png",
                                  "setup_token": "71dd0714e2c96b799994e4f73f1c3f8a",
                                  "userid": "your_system_user"
                                }
                            

Mobile Verification

POST /api/user/verification
Param Type Decription

verify_token

String

Token received from DSA App

pvk

String

DSA Private key
                               {
                                  "verified": true
                            }
                            

Manual Verification

POST /api/user/verification/otp
Param Type Decription

user_id

Any

Your system user id

otp

String

Time base token (6-digit code)

pvk

String

DSA Private key
                               {
                                  "verified": true,
                                  "app": "Test app",
                                  "user_id": "1"
                                }
                            

Request Verification

POST /api/app/verification/request
Param Type Decription

user_id

Any

Your system user id

pvk

String

DSA Private key
                               {
                                  "send": true,
                                  "request_id": "req_60e0404fce80da21af008620dfff51fb",
                                  "app": "Test app",
                                  "user_id": "1",
                                  "qr": "http://dsa.disa.com/api/qr/1572337768281.png"
                                }
                            

Setup - create user account

com.disa.dsa://setup?token=setup_token

- setup_token is get by Create user account API

Option Value

Request code

8080

Result code

0: fail
1: success
val url = "com.disa.dsa://setup?token=${setuptoken}"
val intent = Intent(Intent.ACTION_VIEW, Uri.parse(url))
startActivityForResult(intent, 8080);
                                    
String url = "com.disa.dsa://setup?token=${setuptoken}";
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
startActivityForResult(intent, 8080);
                                    
dsaclientapp://setup?token=setup_token

- setup_token is get by Create user account API

Params Value

success

true
false
let url = URL(string: "dsaclientapp://setup?token=" +setup_token!)!
if UIApplication.shared.canOpenURL(url){
   UIApplication.shared.openURL(url)
}

                                    

User verification

com.disa.dsa://verify?userId=user_id&pbk=publickey
Option Value

Request code

8080

Result code

0: fail
1: success
Key Value

TOKEN

dng6iYvwwRavybWS16EfbtUQ4lHrc8kn4ylIxuO3MNIj...

Using TOKEN to verification user by API Mobile verification

val url = "com.disa.dsa://verify?userId=${user_id}&pbk=${publickey}"
val intent = Intent(Intent.ACTION_VIEW, Uri.parse(url))
startActivityForResult(intent, 8080);
                                    
String url = "com.disa.dsa://verify?userId=${user_id}&pbk=${publickey}";
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
startActivityForResult(intent, 8080);
                                    
dsa2fa://verify?userId=user_id&public_key=publickey
Key Value

success

true
false

verify_token

dng6iYvwwRavybWS16EfbtUQ4lHrc8kn4ylIxuO3MNIj...

Using verify_token to verification user by API Mobile verification

let url_str = "dsa2fa://verify?userId=" + userId + "&public_key=\(public_key)"
let url = URL(string: url_str)!
if UIApplication.shared.canOpenURL(url){
  UIApplication.shared.open(url)
}

POSTBACK

METHOD

POST

Event

verify
setup
                               { "action": "verify",
                                 "user_id": "user2",
                                 "request_id": "req_1eac39fd3f54d9c105b0cc80e51a6cb5",
                                 "isCompleted": true }
                            
                               { "action": "setup", 
                                 "user_id": "user323", 
                                 "isCompleted": true }