Expand my Community achievements bar.

SOLVED

Retrieving the latest LinkedIn posts

Avatar

Level 2

 

Hi team,

Could someone assist me in retrieving the latest LinkedIn posts content using the OSGi service class?

https://learn.microsoft.com/en-us/linkedin/shared/authentication/authorization-code-flow?context=lin...

 

Thanks in advance

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @mahesh_tesla 

The link you have attached talks about the oAuth flow which will need browser intervention in order to complete the authentication process.

 

You can go for the below approach with client credential flow if its a company account or a generic account. 

1) Get the access token by sending the clientID and secret . Can be created as a token service and pass the credentials through OSGI configs.

2) Once you get the token you can hit the required API by passing the the authorization and retrieve the response. 

3) same can be retrieved in front end using a servlet or can be dynamically included on the page

https://learn.microsoft.com/en-us/linkedin/shared/authentication/client-credentials-flow?context=lin...

 

AEM REST API integration example

https://kiransg.com/2021/11/08/aem-rest-service-using-http-client-factory/

 

 

Hope this helps

 

 

 

 

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

Hi @mahesh_tesla 

The link you have attached talks about the oAuth flow which will need browser intervention in order to complete the authentication process.

 

You can go for the below approach with client credential flow if its a company account or a generic account. 

1) Get the access token by sending the clientID and secret . Can be created as a token service and pass the credentials through OSGI configs.

2) Once you get the token you can hit the required API by passing the the authorization and retrieve the response. 

3) same can be retrieved in front end using a servlet or can be dynamically included on the page

https://learn.microsoft.com/en-us/linkedin/shared/authentication/client-credentials-flow?context=lin...

 

AEM REST API integration example

https://kiransg.com/2021/11/08/aem-rest-service-using-http-client-factory/

 

 

Hope this helps

 

 

 

 

Avatar

Administrator

@mahesh_tesla Did you find the suggestion from @sherinregi helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.



Kautuk Sahni