INTRO
The EducUp's API (https://externalapi.educup.io/index.html) exposes a group of functionalities that allow educators and companies to interact with EducUp more robustly and sophisticatedly. You can do things like:
a) Get a list of your courses.
b) Grant a learner premium access to one of your courses.
c) Get the list of the courses in your company's library.
d) Obtain a token for a user (like a session) so they don't have to log in to educup and can interact with your content. (This is perfect for cases where you embed your courses outside the studio. i.e., your dashboard, etc.)
e) For companies, they can create a user (which then can access the company
Private courses).
f) Create groups where you can add users or learners.
Obtaining an API Key Token
To begin using the EducUp API, you must first obtain an API key token. This token authenticates requests to the EducUp API.
Steps to obtain an API Key Token:
1. Sign Up or Log In: If you haven´t already, sign up for an account on EducUp´s platform. If you already have an account, log in using your credentials.
2. Navigate to API Settings: Once logged in, go to your account settings or dashboard and look for an option related to API settings or developer tools.
3. Generate API Key: In the API settings section, you should find an option to generate an API Key. Click on this option to create a new API Key token.
4. Copy API Key: Copy the token provided after generating the API Key. This token will be used to authenticate your requests to the EducUp API. Please store it securely, as it will not be provided again. You must create a new API Key or regenerate the existing one if lost.
5. Authentication: To authenticate requests, include the token value in the "Authorization" header of your HTTP requests.
Interactive documentation
Explore the features of the EducUp API using the interactive documentation available at https://externalapi.educup.io/index.html. There, you can utilize your token to access API functionalities.
Obtaining Courses
To retrieve courses, request HTTP GET to the URL http://externalapi.educup.io/api/v1/courses , including the token in the Authorization header.
The response will contain information structured as follows. View the sample below:
The "data" field contains the list of courses with the provided fields.
Obtaining User Token
To obtain a user token, which can authenticate the user for various purposes, such as embedding a lesson or a course, make an HTTP POST request to the endpoint /API/v1/studio/obtain-user-token. In the params, you must pass:
External ID: This is an identifier we'll use to identify your user. You will see his identifier when you access the user's activity via the API or from the Studio.
Course ID: The ID of the course in EducUp for which you want the token.
First & Last Name: Provide the user's first and last name (optional) in case you want to find them later when reviewing this information.
CountryISOCode: The country of the user. (optional)
For example, the URL would appear as follows:
The response will contain a JSON object structured as follows:
The access token authenticates the user for API requests. The refresh token can obtain a new access token when the current one expires. The expires field indicates the validity period of the access token in seconds.
Embedding a Course
You can use the provided HTML snippet to embed a course for a user. You can obtain this URL from the Links section of the specific course in the Studio (https://studio.educup.io/courses/{course}/content/links).
There are two ways to embed a course:
1. Embed Course + authenticate users
This method is the most recommended since the user will automatically get into your course without the need to authenticate themselves. Therefore, the experience will be much more smooth for them. To accomplish this, you only need first to obtain a token for the user (see section: Obtain User Token), and then you embed the dynamically built URL: https://app.educup.io/courses/{courseId}?token={userToken} (passing the correct course ID, and the user's token). By doing so, the user can access the course, and all their interaction will be saved so you can have it available.
2. Embed Course without authentication
Using this method, you can embed the course without automatically authenticating the user. Instead, once they complete the authentication process, they will be redirected to the login page and then to the course page.
Here´s the HTML for embedding without user authentication:
But in general, the idea is to embed the URL: https://app.educup.io/courses/{courseId} (passing the correct course ID).
In this case, if you are an educator or a company and the user is one of the students or employees, we highly recommend adding the user to your course and assigning premium access beforehand to ensure the user can access all the course content seamlessly.
Embedding all your Courses
You can use the provided HTML snippet to embed all your courses into your webpage or dashboard. You can access this embeding code from the Links section in your profile. By embedding your academy, you will be able to provide your users a single-access point to all of your content.
Accessing the user's learning data
You can access the user's information in 2 different ways:
1. From the EducUp Studio
You can access the user's data, including details, activities, enrolled courses, and more, from the EducUp Studio. (https://studio.educup.io/learners).
2. From the EducUp's API
To access the learner's information using the API you just need to make an HTTP GET request to the endpoint: https://externalapi.educup.io/api/v1/users/{id}, passing either the learner's educup id or the external id you provided to create the user's session.
Creating a User and Assigning a Product
To create a user and assign a product or directly assign a product to an existing user, make an HTTP POST request to http://externalapi.educup.io/api/v1/courses/add-premium-user
If the user already exists, only the premium product will be assigned to them.
This guide provides essential steps for configuring and using the EducUp API. The API documentation provides further details and advanced functionalities.