Skip to main content

Authorize

Login

Use this API to generate JWT token and refresh token.

 POST /authorize/login

Request body parameters

FieldTypeDescription
email
required
stringEmail Address
password
required
stringPassword
domainstringCustom Domain of your account. e.g.: lms.example.com
{
"success": true,
"data": {
"response": {
"acknowledgement": "Success",
"data": {
"user": {
"id": 8,
"firstName": "Pooja",
"lastName": "G",
"email": "pooja.g@example.com",
"mobile": "+919876543210",
"uniqueId": "10105",
"role": "Trainee",
"language": "en-US",
"timezone": "Asia/Kolkata",
"sessionToken": "********",
"companyId": 101,
"companyName": "Horizzon Information Tech. Pvt Ltd"
},
"token": "***********",
"refresh-token": "********"
},
"error": {
"code": "",
"internal_message": "",
"moreInfo": []
}
}
}
}

Generate Token

Use this API to generate JWT token using refresh token.

 POST /authorize/refresh-token

Request body parameters

FieldTypeDescription
refreshToken
required
stringRefresh Token
{
"success": true,
"data": {
"response": {
"acknowledgement": "Success",
"data": {
"status": "ok",
"token": "**********"
},
"error": {
"code": "",
"internal_message": "",
"moreInfo": []
}
}
}
}

Login via SSO

Use this API to login into LMS using SSO.

 POST /authorize/third-party

Request body parameters

FieldTypeDescription
provider
required
integer1 - Google
thirdPartyData
required
jsonArraythis jsonArray has "token" as key and value is token returned by google after verification.
{
"token":"**************"
}
{
"success": true,
"data": {
"response": {
"acknowledgement": "Success",
"data": {
"user": {
"id": 8,
"firstName": "Pooja",
"lastName": "G",
"email": "pooja.g@example.com",
"mobile": "+919876543210",
"uniqueId": "10105",
"role": "Trainee",
"language": "en-US",
"timezone": "Asia/Kolkata",
"sessionToken": "********",
"companyId": 1,
"companyName": "Horizzon Information Tech. Pvt Ltd"
},
"token": "***********",
"refresh-token": "********"
},
"error": {
"code": "",
"internal_message": "",
"moreInfo": []
}
}
}
}

Redirect to Course from your custom websites/frontend

Use this end point to redirect Trainees from your custom websites/frontend to a Course inside the LMS.

 POST https://{your.lms.custom.domain}/site/login-by-jwt-token

Request body parameters

FieldTypeDescription
token
required
stringToken
type
required
integerIf you are passing token of Admin/Manager then type = 1
If you are passing token of Trainee then type = 2
inputData
required
jsonArrayIf type = 1 than inputData = { "enrollmentId": 12555 }
If type = 2 than inputData = { "enrollmentId": 12555 }
<form action="https://{your.lms.custom.domain}/site/login-by-jwt-token" id="logintoalms0" method="post">
<input type="hidden" id="token" name="token" value="******">
<input type="hidden" id="inputData" name="inputData" value={ "enrollmentId" : 12555 }>
<input type="hidden" id="type" name="type" value="2">
<a href="#" class="btn" onclick="submitForm(0)">View</a>
</form>

Forgot Password

Use this API to send a password reset link via email.

 POST /authorize/forgot-password

Request body parameters

FieldTypeDescription
email
required
stringEmail Address
domainstringCustom Domain of your account. e.g.: lms.example.com
sendEmailNotificationboolean1 = Yes, 2 = No (Default)
{
"success": true,
"data": {
"response": {
"acknowledgement": "Success",
"data": {
"token": "********************"
},
"error": {
"code": "",
"internal_message": "",
"moreInfo": []
}
}
}
}