e-Schooling API
  1. sso
e-Schooling API
  • e-Schooling API
  • GETTING STARTED
    • Authorization
    • Defaults
  • entities
    • Gets all system entities
      GET
    • Gets a entity from its id
      GET
  • students
    • Gets all system students
      GET
    • Gets a student from its id
      GET
  • tutors
    • Gets all system tutors
      GET
    • Gets a tutor from its id
      GET
  • staffs
    • Gets all system staffs
      GET
    • Gets a staff from its id
      GET
  • teachers
    • Gets all system teachers
      GET
    • Gets a teacher from its id
      GET
  • system
    • Obtain tenant informations
      GET
  • sso
    • Single Sign-On
    • Generate OAuth2 Token
      POST
    • Get user info
      GET
  • Schemas
    • Schemas
      • BadRequestHttpException
      • EntitiesAddresses
      • EntitiesContacts
      • EntityBankAccount
      • EntitiesList
      • EntityIdentificationDocument
      • Entity
      • HttpStatusCode
      • InternalServerErrorHttpException
      • MethodBase
      • EntityIdentificationDocumentInsertRequest
      • NotFoundHttpException
      • NoContent
      • EntityInsertRequest
      • OAuthMeResponse
      • OAuthTokenResponse
      • ProblemDetails
      • Staff
      • StaffIdentificationDocumentInsertRequest
      • StaffInsertRequest
      • StaffsList
      • Student
      • StudentIdentificationDocumentInsertRequest
      • StudentInsertRequest
      • StudentsList
      • SystemStatus
      • Teacher
      • TeacherIdentificationDocumentInsertRequest
      • TeacherInsertRequest
      • TeachersList
      • Tutor
      • TutorIdentificationDocumentInsertRequest
      • TutorInsertRequest
      • TutorsList
  1. sso

Single Sign-On

OAuth2 Authentication Flow#

How to use e-Schooling Account to authenticate in your application#

First of all, to use the e-Schooling Account to access your application it needs to be registered in our system together with the redirect URIs you may want us to redirect the user after the credentials verification. This redirect URIs must expect a parameter named “code” in order to follow the OAuth2 authentication flow.
You will be assigned a client_id that is associated to those given redirect URIs.
image.png
After this registration is completed the process will behave as following:

Step 1#

External application redirects it’s user to the e-Schooling external authentication page using the following url:
https://app.e-schooling.com/oauth2/login?response_type=code&client_id={your_client_id}&redirect_uri={your_redirect_uri}
The user will be presented with the following page:
image.png
1.
User enters credentials to be validated.
2.
client_id and redirect_uri are verified.
3.
A code is generated and the user is redirected to the given redirect_uri as shown in the following example: https://app2.com/home/index?code=9d7be3d1-6e34-4bb8-8319-3a64893ffa43
4.
This code is valid for 10 minutes.

Step 2#

The code obtained in the previous step allows the external application to call the e-Schooling API “oauth2/token” method.
1.
The code is validated using the given client_id and redirect_uri. If the client_id or redirect_uri doesn’t match with those associated to the code or the code is expired the response will be “invalid_grant”.
2.
JWT token is generated and returned.

Step 3#

Use the token to obtain information about the user calling the e-Schooling API “oauth2/me” method. This method will return the user email and the tenant where the user logged in.
Modified at 2025-04-09 12:00:08
Previous
Obtain tenant informations
Next
Generate OAuth2 Token
Built with