Access API Linkedin with B2C user - asp.net

I have created a B2C tenant with an user flow that contain a linkedin way for connect.
In my ASP.NET website, i want to display linkedin's informations of the user connected.
In my research, i have seen different way to make this but it is possible only with custom policy and i need to know if in 2020, there is a solution or not, to get user info by linkedin.
Thank you in advance.

Sounds like passing an access token through a user flow to your application can be useful. With the access token the application will be able to call the LinkedIn API directly.

Related

LinkedIn - Basic profile API access issues

We are integrating the Linkedin Oauth into our software and would like to retrieve the “vanityname” value from the user account in order to display it in our UI (so the user knows which linkedin account they connected to).
Currently the vanityname seems to be only available for "Basic" profile, but our App only has access to "Lite". We looked everywhere but cannot find a way to request this permission specifically, or request access to “Basic” profile info;
Could you let me know how/where to apply for this permission? I am happy to provide the full usecase and flow of course.

How can I access the Google Calendar API through Google Actions and Dialog Flow

Referencing this post
, I tried to create an access token for my Google Actions. I enabled Google sign in, and end up with a user-id. The top post says "You can combine this with a web- or app-based Google Sign-In to get their permission to access OAuth scopes if you need to access Google's APIs" but I honestly have no idea how to do that. What I'm trying to do is get an access token from Google Actions/ Dialog flow to send to my server-end code in order to make a successful API POST request to Google Calendar API.
The post you reference that points to another StackOverflow answer that discusses the approach. It basically says that you need to combine two things to do what you want:
You use Google Sign In on a web page to let the user authorize you to access the calendar on their behalf.
You probably should use the hybrid flow so the access/refresh tokens are only handled on the server side - not in your web client.
Your server will store the access/refresh tokens in some way so you can use them as part of your Action later.
You will use Google Sign In for Assistant to authenticate the user when they connect through the Assistant and determine if they have already authorized you to access their calendar. If they have, you'll be able to get their access/refresh tokens out of your store and access their calendar.
You can't do it completely through AoG/Dialogflow because there is no way for the user to grant OAuth permissions to you by voice alone - this is why you need to direct the user to a web page for them to grant you permission to access their calendar.

Linkedin Oauth2 Client Credentials grant type

Asking the question here as the linkedin help forum directed to post things related to API on stackoverflow.
I am developing a feature on our org website to show the top 5 company page feeds setup in linkedin. Ive already setup the required access in developer.linkedin and the whole flow works in the developer.linkedin REST console to fetch the feed.
I am currently recieving this error when i try from my machine to fetch the auth token with a valid client id and secret created.
https://www.linkedin.com/oauth/v2/accessToken?grant_type=client_credentials&client_id=OMITTED&client_secret=OMITTED
{
"error": "access_denied",
"error_description": "This application is not allowed to create application tokens" }
The documentation also mentions that this flow isn't available by default and the users will need to contact linkedin.
https://developer.linkedin.com/docs/v2/oauth2-client-credentials-flow
"By default, your application will not have the ability to use LinkedIn's client credentials flow. Contact us to have your application granted permission to use this flow."
What would be the next steps in requesting access to this flow for my org?.
As outlined here:
By default, your application will not have the ability to use LinkedIn's client credentials flow. Contact us to have your application granted permission to use this flow.
The next step would be to contact them directly or Apply to become a Partner
and if accepted you'll be granted access to additional data outside of the scope of the user authentication flow (which basically means you'll be able to make calls directly from your application to access certain information)
I think the answer is well explained by API-University, since the creation of an application in order to get the access_token, will solve the communication issue.
Link to the explanation: https://api-university.com/blog/api-usage/how-to-use-the-linkedin-api-and-oauth/

Google Calendar API - access other users google calendar via service account without manual authentication

I want to be able to access other users Google Calendars through a service account so I am not prompted for authorization. I am doing this in a simple .net c# console app. When I attempt to create my credentials in the Google API Manager, it gives me the following alert when I specify I am using a non UI app and I want to access User Data. Isn't the purpose of using the service account to access other users data without a UI?
"User data cannot be accessed from a platform without a UI because it requires user interaction for sign-in."
You may have misunderstood the meaning of using a service account to impersonate a user. To help you with Authentication, you might want to check this tutorial : Google Calendar API Authentication with C# by Daimto.
Things to take note of :
To be able to access other calendars by service account, users who own the calendar should share it to the service account.
To impersonate a user, you must know the email address.
From the tutorial:
If you are only accessing data that you own there is no reason to ask a user for permission to access it. You can use a Service account. (Privacy)
If you want to be able to access data owned by someone else you will need to be authenticated.
Hope this helps!

LinkedIn Integration flow using Spring social

I am trying to provide get access to LinkedIn data in a Spring-based web application.The idea is to connect to a LinkedIn account, get LinkedIn data(education or employer information for argument sake) & show that data on my application's page. Now I studied a bit on Spring Social OAUTH abstraction for LinkedIn(using spring-social-linkedin) and also read some code samples for accessing data but I am still unable to wrap my head around this flow and how do I write the code for my specific purpose?
Do I create a specific web page where user put's in his LinkedIn login details and the ConnectController (already intialized in IOC container) will then take care of the connection?
If so what will be the action & method values on the Login page?
If no login page is to be created, how will LinkedIn account details be inputted by user and How will ConnectController get the account details to authenticate?
Once authenticated, how to navigate through user's data?
If someone can explain in a step-by-step manner how to approach my requirement here,would really appreciate it.

Resources