hypersign-protocol / hack

Keep solving problems :)
3 stars 2 forks source link

Collect CRED API refrence and explain the data that can be used for HYPERSIGN #1

Open vikramIde opened 3 years ago

vikramIde commented 3 years ago

Reference cRED API

  1. Get Partner access token https://documenter.getpostman.com/view/17084937/Tzz7PyMZ#a7defa17-585f-4ec0-bbf8-9bc8aa4351a6

  2. User Authentication https://documenter.getpostman.com/view/17084937/Tzz7PyMZ#eeb008ea-b1c1-46d6-b8f5-964b52904aad

  3. User Profile https://documenter.getpostman.com/view/17084937/Tzz7PyMZ#889ae295-418a-4c19-a2d9-e1a27d401437

Vishwas1 commented 3 years ago

Use these our two apis for generating and verifying OTP via Cred

Generate OTP

Url: https://stage.hypermine.in/whitelist/api/v1/cred/generateOTP
Method: POST
Header: {
     "Authorization" : "Bearer <Hypersign Auth Token>"
}
Body: {
    "phoneNumber": "9999999999"
}

Response:

{
    "token": "U2FsdGVkX19RQZ8UaKFLS4vxpmpOVeQ9fBoAj/Zo+xA="
}

Verify OTP and receive profile

Url: https://stage.hypermine.in/whitelist/api/v1/cred/verifyOTP
Method: POST
Header: {
     "Authorization" : "Bearer <Hypersign Auth Token>"
}
Body: {
    "otp": "123eee4",
    "token": "U2FsdGVkX19RQZ8UaKFLS4vxpmpOVeQ9fBoAj/Zo+xA="
}

Response

{
    "last_name": "Srivastava",
    "first_name": "Prateek",
    "phone": "9999999999",
    "trust_score": 82.95,
    "email": "prateek@gmail.com",
    "coins": 100000,
    "existing_user": true
}