Uncategorized

AuthX Public API (Management and Authentication)

Access Token

Request URLhttps://{apipath}-{Hostname}.authx.com/AccessToken

Request Headers

Property Name

Required

Type

Description

ApplicationId

yes

String

Manage API AppId

ApplicationKey

yes

String

Manage API AppKey

ApplicationId:3128e336-64f9-e294-17b5-ed1f34d76f79
ApplicationKey:2f924cad-98c5-3631-b3a4-e107dee7e014

Response

Property Name

Type

Description

access_token

String

Token value

token_type

String

Value returned will be “bearer”

expires_in

String

Validity period (seconds)

CompanyId

Integer

Account id of the portal company

.issued

String

Issued Date time

.expires

String

Expiring Datetime

Sample Response

{
    "access_token": "pUrAZv8YzOJWt1WhI3lS9LfWumCBLaLUCk_KAIR-vq5Z3VrnmhutgYZy2MmU25SaECVfPktWMor7arQkDgF1MnbxpQN6GPgPxcugv_vrBQmqC5I4eZPDNr7eKJ9frmMmQ0Tl4qvFX20g7A7sw7zBbW9xDaRG_gTYNeGvkJ4yxguk2yhFD8jgaF5_lwHecK0c0vAhUhH7470cDv12Xl85f0VHU1DZBUXKENVSTamtjdk",
    "token_type": "bearer",
    "expires_in": 1209599,
    "CompanyId": "10022513",
    ".issued": "Mon, 22 Mar 2021 06:38:24 GMT",
    ".expires": "Mon, 05 Apr 2021 06:38:24 GMT"
}

Add User

Request URLhttps://{apipath}-{Hostname}.authx.com/AddUser

Request Headers

Property Name

Required

Type

Description

Authorization

yes

string

bearer token

'Authorization: Bearer FS6gKnDhAyoOsD9L8x5ggJ5wfnPTjbsA0rfSvL4-QETlM8lrKTozbi8oPJ04moIIdkFM0U6_iTbJCSouWdT1-8ZCPdpa9p2HDMyJwz3YSMEQejmSppB_npQeaIpCttHG7PwqIS_fPYBDCyv-zAs9m3FwXeo1vcBpGrsTerI-oJTXUz-7YyQx67mYaSgzUOLkZDw9Vk7YeJjN2FDz23gHcHF5RjGFBcedneEA7RMZJAS0FKQ' 

Request Body

Key

Required

Type

Description

user_name

Yes

String

Unique username of user

first_Name

Yes

String

First Name

last_Name

Yes

String

Last Name

email

Yes

String

Email

countrycode

Yes

string

Country code

number

Yes

String

Phone number

alias_name

No

String

Additional usernames for the user

alias_name1

No

String

Additional usernames for the user

alias_name2

No

String

Additional usernames for the user

alias_name3

No

String

Additional usernames for the user

alias_name4

No

String

Additional usernames for the user

Sample Request

  • Add User Request

{
    "guid": "",
    "user_name": "Richard001",
    "email": "Richardmiller@gmail.com",
    "name": {
        "first_Name": "Richard",
        "last_Name": "miller"
            },
    "phone": {
        "mobile": {
              "countryCode":"+91" ,//deafult if not passed would be +1
              "number": "9876813805"
                  }
             },
    "alias_name": "", //Optional,
    "alias_name1": "", //Optional,
    "alias_name2": "", //Optional,
    "alias_name3": "", //Optional,
    "alias_name4": "" //Optional,
}

Response Body

Key

Type

Description

response_code

Integer

1 – Success ,0 – Error

response_subcode

Integer

100 – Exception

response_text

String

Message description if error occurs

response_data

string

UniqueuserId of the user added

Sample Response

  • Add User response

{
    "response_code": 1,
    "response_subcode": 0,
    "response_text": null,
    "response_data": "{\"guid\":\"bf78c938-bf06-4625-bf79-7622f3f98e88\"}"
}

Update User

Request URL: https://{apipath}-{Hostname}.authx.com/UpdateUser

Request Headers

Property Name

Required

Type

Description

Authorization

yes

string

bearer token

'Authorization: Bearer FS6gKnDhAyoOsD9L8x5ggJ5wfnPTjbsA0rfSvL4-QETlM8lrKTozbi8oPJ04moIIdkFM0U6_iTbJCSouWdT1-8ZCPdpa9p2HDMyJwz3YSMEQejmSppB_npQeaIpCttHG7PwqIS_fPYBDCyv-zAs9m3FwXeo1vcBpGrsTerI-oJTXUz-7YyQx67mYaSgzUOLkZDw9Vk7YeJjN2FDz23gHcHF5RjGFBcedneEA7RMZJAS0FKQ' 

Request Body

Key

Required

Type

Description

guid

required

AlphaNumeric

Id obtained after adding user

user_name

Yes

string

Unique username of user (Non Editable)

first_Name

yes

String

First Name

last_Name

yes

String

Last Name

email

Yes

String

Email

countrycode

yes

string

Country code

number

yes

String

Phone number

Sample Request

  • Update User Request

{
    "guid": "bf78c938-bf06-4625-bf79-7622f3f98e88",
    "user_name": "Richard088",
    "email": "Richardmiller088@gmail.com",
    "name": {
        "first_Name": "Richard",
        "last_Name": "miller"
            },
    "phone": {
        "mobile": {
              "countryCode":"+91" ,//deafult if not passed would be +1
              "number": "9876813805"
                  }
             },
    "alias_name": "", //Optional,
    "alias_name1": "", //Optional,
    "alias_name2": "", //Optional,
    "alias_name3": "", //Optional,
    "alias_name4": "" //Optional,
}

Response Body

Key

Type

Description

response_code

Integer

1 – Success ,0 – Error

response_subcode

Integer

100 – Exception

response_text

String

Message description if error occurs

response_data

string

guid of the user updated

Sample Response

  • Update User response

{
    "response_code": 1,
    "response_subcode": 0,
    "response_text": null,
     "response_data": "{\"guid\":\"bf78c938-bf06-4625-bf79-7622f3f98e88\"}"
}

Delete User

Request URLhttps://{apipath}-{Hostname}.authx.com/DeleteUser

Request Headers

Property Name

Required

Type

Description

Authorization

yes

string

bearer token

'Authorization: Bearer FS6gKnDhAyoOsD9L8x5ggJ5wfnPTjbsA0rfSvL4-QETlM8lrKTozbi8oPJ04moIIdkFM0U6_iTbJCSouWdT1-8ZCPdpa9p2HDMyJwz3YSMEQejmSppB_npQeaIpCttHG7PwqIS_fPYBDCyv-zAs9m3FwXeo1vcBpGrsTerI-oJTXUz-7YyQx67mYaSgzUOLkZDw9Vk7YeJjN2FDz23gHcHF5RjGFBcedneEA7RMZJAS0FKQ' 

Request Body

Key

Required

Type

Description

guid

required

AlphaNumeric

Id of user which need to delete

Sample Request

  • Delete User Request

{
    "guid": "bf78c938-bf06-4625-bf79-7622f3f98e88"
}

Response Body

Key

Type

Description

response_code

Integer

1 – Success ,0 – Error

response_subcode

Integer

100 – Exception

response_text

String

Message description if error occurs

response_data

string

Sample Response

  • Delete User response

{
    "response_code": 1,
    "response_subcode": 0,
    "response_text": null,
    "response_data": null
}

Generate Pin

Request URLhttps://{apipath}-{Hostname}.authx.com/GeneratePin

Request Headers

Property Name

Required

Type

Description

Authorization

yes

string

bearer token

'Authorization: Bearer FS6gKnDhAyoOsD9L8x5ggJ5wfnPTjbsA0rfSvL4-QETlM8lrKTozbi8oPJ04moIIdkFM0U6_iTbJCSouWdT1-8ZCPdpa9p2HDMyJwz3YSMEQejmSppB_npQeaIpCttHG7PwqIS_fPYBDCyv-zAs9m3FwXeo1vcBpGrsTerI-oJTXUz-7YyQx67mYaSgzUOLkZDw9Vk7YeJjN2FDz23gHcHF5RjGFBcedneEA7RMZJAS0FKQ' 

Request Body

Key

Required

Type

Description

guid

required

AlphaNumeric

UniqueId of the user

pin

required

string

Any random pin given by user

Sample Request

  • Generate Pin Request

{
    "guid": "bf78c938-bf06-4625-bf79-7622f3f98e88",
    "pin":"102374"
}

Response Body

Key

Type

Description

response_code

Integer

1 – Success ,0 – Error

response_subcode

Integer

100 – Exception

response_text

String

Message description if error occurs

response_data

string

Sample Response

  • Generate Pin response

{
    "response_code": 1,
    "response_subcode": 0,
    "response_text": null,
    "response_data": null
}

Verify Pin

Request URL: https://{apipath}-{Hostname}.authx.com/VerifyPin

Request Headers

Property Name

Required

Type

Description

Authorization

yes

string

bearer token

'Authorization: Bearer FS6gKnDhAyoOsD9L8x5ggJ5wfnPTjbsA0rfSvL4-QETlM8lrKTozbi8oPJ04moIIdkFM0U6_iTbJCSouWdT1-8ZCPdpa9p2HDMyJwz3YSMEQejmSppB_npQeaIpCttHG7PwqIS_fPYBDCyv-zAs9m3FwXeo1vcBpGrsTerI-oJTXUz-7YyQx67mYaSgzUOLkZDw9Vk7YeJjN2FDz23gHcHF5RjGFBcedneEA7RMZJAS0FKQ' 

Request Body

Key

Required

Type

Description

guid

required

AlphaNumeric

UniqueId of the user

pin

required

string

pin for verification

Sample Request

  • Verify Pin Request

{
    "guid": "bf78c938-bf06-4625-bf79-7622f3f98e88",
    "pin":"102374"
}

Response Body

Key

Type

Description

response_code

Integer

1 – Success ,0 – Error

response_subcode

Integer

100 – Exception

response_text

String

Message description if error occurs

response_data

string

Sample Response

  • Verify Pin response

{
    "response_code": 1,
    "response_subcode": 0,
    "response_text": null,
    "response_data": null
}

Process Biometrics

This Api used to add Biometric authentication factors for the user such as face, palm and fingerprint.

Request URLhttps://{apipath}-{Hostname}.authx.com/ProcessBiometric

Request Headers :

Property Name

Required

Type

Description

Content-Type

yes

string

mutipart data

Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW

Content-Disposition: form-data; name="biometricdata"; filename="blob"
Content-Type: application/octect-stream

Content-Disposition: form-data; name="processBiometrics"

Request Body : form-data

Key

Required

Type

Description

processBiometrics

required

object

UniqueId of the user and application parmaters for authentication

biometricdata

required

bytes

For face and fingerprint only.

Sample Request

  • Process Biometric Request

Key

Description

processBiometrics

{“authentication_id”:2,”process_type”:1,”user_name”:”d43b767b-848f-4847-b37d-36bcd4b2f611″,”correlation_id”:”5c07c4ed-784d-c82f-19a7-a94221bb7f8b”,”device_data”:{“browser_name”:”Chrome”,”os”:”Windows”,”os_version”:”windows-10″,”browser_version”:”89.0.4389.82″,”device_name”:”Unknown”,”ip”:”103.40.198.171″,”src_user_id”:0},”application_parameters”:{“application_key”:”BDD0D146-09DF-452B-AAD0-2B5F4E91F748″,”secret_key”:”B1B1620C-091A-48A6-AA99-C80AA7B07137″,”host_name”:”hu1tjtwu”},”src_user_id”:0}


biometricdata

captured biometric data

POST /ProcessBiometric HTTP/1.1 Host: {{LocalUrl}} Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gWAuthorization: Bearer jUTaVUcJUJvAtEb11yx52am8muEEFIG-YWCH_2HkxpfmdLKT5hFLgYD-Z1j8fHQ4OiLW5x9TOozwNiDw5Uw20BgY0EVISfp3m9KRArKPx-83cqLJNTNMfR7K_mTr3soipi7FOVBsojdHMKAMmNPGddlrTK5047hVuXQngjaAYQm0oPS0LQ0GYbpXL3Hg6qXl0AUBYWI1FcIOwqty-VaZ1L0aS_8syuSxib7s4SKS-jryBN0pEVdfkUmBgXCCONkV7r02GSjO0vDAVwdNLwMRJ8Q4yOYVNofBWnRzDKBjFOYWDFBTMb8J20lOqsFmZvwmi477_g3KfAFmhvqWpozGaTQr8m4lbx-E9iT85uYKuwWGy1b62MePMiqyLhJJMLK2Content-Length: 820----WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="processBiometrics"
{"authentication_id":3, //1-Finger,2-Face,3-Palm
"process_type":2,//1-Enroll,2-Verify,3-Delete
"user_name":"bf78c938-bf06-4625-bf79-7622f3f98e88",
"device_data":{"browser_name":"Chrome","os":"Windows","os_version":"windows-10","browser_version":"89.0.4389.90","device_name":"Unknown","ip":"157.46.112.18","src_user_id":222},
"application_parameters":{"application_key":"CD7A09F0-D3CE-4C93-A5FC-0E70FD69C713",
"secret_key":"88E897AE-B15C-42A9-B61D-D3B80617D378",
"host_name":"foik41na"},
"src_user_id":222}
----WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="biometricdata"; filename="blob"
Content-Type: application/octect-stream
(data)
----WebKitFormBoundary7MA4YWxkTrZu0gW

Response Body

Key

Type

Description

response_code

Integer

1 – Success ,

0 – Error,

FaceNotMatch – 2,
FaceQualityPoor – 3,
TooManyFace – 4,
FaceNotFound – 5,
FaceOutBound – 6,
SettingsMissed – 7,
UserNotExists – 8

response_subcode

Integer

100 – Exception

response_text

String

Message description if error occurs

response_data

string

Sample Response

  • Process Biometric response

{
    "correlation_id": null,
    "response_code": 5,
    "response_subcode": 0,ipcongi
    "response_text": null,
    "response_data": null
}

Leave a Reply