Please contact the Lyearn Team to get the clientid
and clientSecret
for your academy.
<aside> 💡 If You are using API-Key in Extension you don’t need clientSecret from Lyearn Team. The API-Key would be provided by end user using the extension. Which will be required for Authentication. You can simply replace clientSecret value with API-Key Provided by the client
</aside>
Importing the [Lyearn Public API - Prod] Collection in Postman
An Authenticated Access-Token is required to access all endpoints provided in the [Lyearn Public API - Prod] postman collection. Once you have your clientid and clientSecret you can generate an access token by following the steps mention below.
3.1 Once the postman collection has been imported, expand the collection with the down arrow on the left of the collection name. It should look similar to the reference image provided below.
3.2 Go to Authentication → Generate Auth Token → Body → x-www-form-urlencoded and enter the clientid
: <clientid provided by Lyearn Team>
and clientSecret
: <clientSecret provided by Lyearn Team or the API Key provided by end user>
as 2 different key-value pairs [as shown in the reference image 3.2]. Hit Send. You should get 2 JSON fields [accessToken and expiresIn] in the response body [as shown in the reference image 3.2].
3.3 ****Copy the accessToken returned in step 3.2. It will be required to access all other endpoints.
<aside> 💡 The Access-Token that you generate will expire in 12 hours. Make sure to generate a new accessToken at regular intervals. (New access tokens can be generated with the same clientid and clientSecret)
</aside>