OTP Services
This API is associated with sending OTP to user on the Sunbird Platform.
- The endpoint for Generate OTP is
otp/v1/generate
- The fields marked with an asterisk (*) are mandatory. They cannot be null or empty.
To make use of the API, you require authorization. Raise a request to the administrator for the use of the API. You will receive the authorization key. Specify the key received, here.
OK ! Successful operation."Generate OTP" operation was successfully executed.
Create Content Response
BAD REQUEST. The "Generate OTP" operation failed ! The possible reason for failure is that you may have missed providing input for a mandatory parameter.
INTERNAL SERVER ERROR ! Looks like something went wrong! These errors are tracked automatically, but if the problem persists feel free to contact us. In the meantime, try refreshing.
POST /api/otp/v1/generate HTTP/1.1
Host: staging.sunbirded.org
Authorization: text
Content-Type: application/json
Accept: */*
Content-Length: 100
{
"request": {
"userId": "372175df-7f44-48df-8aa5-4t6228996b06s",
"key": "[email protected]",
"type": "email"
}
}
{
"id": "api.otp.generate",
"ver": "v1",
"ts": "2020-12-01 10:49:01:948+0000",
"params": {
"resmsgid": null,
"msgid": "12eb0ca45ce4c776fab994d120bedd41",
"err": null,
"status": "success",
"errmsg": "null."
},
"responseCode": "OK",
"result": {
"response": "SUCCESS"
}
}
This API is associated with verifying the OTP of the user on the Sunbird Platform.
- The endpoint for Verifiy OTP is
otp/v1/verify
- The fields marked with an asterisk (*) are mandatory. They cannot be null or empty.
- The Otp provided in the request is verified with the available otp generated for the user within the sunbird system.
To make use of the API, you require authorization. Raise a request to the administrator for the use of the API. You will receive the authorization key. Specify the key received, here.
OK ! Successful operation."Verify Otp" operation was successfully executed.
Create Content Response
BAD REQUEST. The "Verify Otp" operation failed! The possible reason for failure is that you may have missed providing input for a mandatory parameter.
INTERNAL SERVER ERROR ! Looks like something went wrong! These errors are tracked automatically, but if the problem persists feel free to contact us. In the meantime, try refreshing.
POST /api/otp/v1/verify HTTP/1.1
Host: staging.sunbirded.org
Authorization: text
Content-Type: application/json
Accept: */*
Content-Length: 114
{
"request": {
"userId": "372175df-7f44-48df-8aa5-4t6228996b06s",
"key": "[email protected]",
"type": "email",
"otp": "79562"
}
}
{
"id": "api.otp.generate",
"ver": "v1",
"ts": "2020-12-01 10:49:01:948+0000",
"params": {
"resmsgid": null,
"msgid": "12eb0ca45ce4c776fab994d120bedd41",
"err": null,
"status": "success",
"errmsg": "null."
},
"responseCode": "OK",
"result": {
"response": "SUCCESS"
}
}
Last updated
Was this helpful?