September 12, 2023
How to generate an OAuth code, also the Refresh token and Access token.
Comments
(0)
September 12, 2023
How to generate an OAuth code, also the Refresh token and Access token.
Followers: 3 people
(0)

Problem Statement:

When writing an application that makes API calls to Adobe Learning Manager, it is required to authenticate and authorize your client application.

Brief Description:

Adobe Learning Manager is a cloud-hosted, learner-centric, and self-service learning management solution. Customers can access Learning Manager resources programmatically using the Learning Manager API to integrate it with other enterprise applications.

Learning Manager APIs use the OAuth 2.0 framework to authenticate and authorize your client applications. For this, you need to generate an OAuth code, then generate the refresh token and access token using the OAuth code.

Steps to be followed to authenticate and authorize your client application.

Step 1: Set up your application.

To set up your application, you need to register it using the Integration Admin app/page. Once you register your application, you will get the Client ID and Client Secret.

a. Log in as integration admin>>go to application>>click on register (see the screenshot below).

b. Once you click register, you will see the below page. please file the details and then click save.

c. Now, you open the application you registered to get the Client ID and Client Secret needed to generate the OAuth code.

d. Now to generate the OAuth code, use the below Get URL in the browser as it authenticates the Learning Manager users using their pre-configured accounts such as SSO, Adobe ID, and so on.

GET https://captivateprime.adobe.com/oauth/o/authorize?client_id=<Enter your clientId>&redirect_uri=<Enter a URL to redirect to>&state=<Any String data>&scope=<one or more comma-separated scopes>&response_type=CODE.   (See the screenshot below and sample URL for  more clarity)

After successful authentication, your browser redirects to the redirect URL mentioned in the above Get URI. A parameter code is appended along with the redirect URI. (See the screenshot below)

Step 2. Get a refresh token from the code.

POST https://captivateprime.adobe.com/oauth/token Content-Type: application/x-www-form-urlencoded

Body of the post request:

Step 3. Obtain an access token from the refresh token

URL to obtain access token: 

POST https://learningmanager.adobe.com/oauth/token/refresh Content-Type: application/x-www-form-urlencoded

Body of the post request:

Usage limitation:

An access token is valid for seven days. After a day, you have to generate a new access token using a refresh token. If you generate a new access token from a refresh token while an existing access token is still valid, the existing token is returned.

Reference link:

https://helpx.adobe.com/learning-manager/integration-admin/feature-summary/developer-manual.html

 

0 Comments
Add Comment