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.
Header parameters
AuthorizationstringRequired
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.
Body
Responses
200
OK ! Successful operation."Generate OTP" operation was successfully executed.
application/json
Responseall of
Create Content Response
and
400
BAD REQUEST. The "Generate OTP" operation failed ! The possible reason for failure is that you may have missed providing input for a mandatory parameter.
application/json
500
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.
application/json
post
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.
Header parameters
AuthorizationstringRequired
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.
Body
Responses
200
OK ! Successful operation."Verify Otp" operation was successfully executed.
application/json
Responseall of
Create Content Response
and
400
BAD REQUEST. The "Verify Otp" operation failed! The possible reason for failure is that you may have missed providing input for a mandatory parameter.
application/json
500
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.
application/json
post
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?