LinkedIn API Connector V2 Settings Not Working, Postman Works Though

I’ve managed to get my calls to work with postman by doing the following:

  1. (In the browser, I put this call in to get a code)
    Authorize | LinkedIn

  2. (Used postman with the code I received from step 1 to get an access token)
    https://www.linkedin.com/uas/oauth2/accessToken?grant_type=authorization_code&redirect_uri=https://app.mywebsite.com/version-test/api/1.1/oauth_redirect&client_id=*&client_secret=*&code=*

  3. (Used the access token for the Authorization Key field as “Bearer access_token”)
    https://api.linkedin.com/v2/emailAddress?q=members&projection=(elements*(handle~))

and the above returned the email I was looking for.

My problem is that I can’t seem to use the API connector to even try logging in. All my calls keep getting this error:
image

For my settings in the API Connector, they are shown below:

Parameter (id,firstName,lastName,profilePicture(displayImage~:playableStreams))

GET https://api.linkedin.com/v2/emailAddress?q=members&projection=(elements*(handle~))

2 Likes

Do this:

Did you get this working? Any guidance on the fix?

To authenticate, run in debug mode step by step, and then after you login you should get a message saying it’s been authenticated. It works temporarily but doesn’t want to save the key and stay auth’d though. Try it out and see if you can figure something out that I couldn’t.

Hey @sstone it sounds like you did get it working via the API Connector, but the current issue is the longevity of the access token?

I assume you’re using LinkedIn’s 3-legged authorization approach - since see you’re starting with authorization.

If the access token works once it should be good for 60 days. What is the expire time when you exchange the authorization token for the access token?

For example:
"expires_in": 5184000

Also, when you try using the access token a second time, what is the error?

Disclosure: I’m co-founder of Ayrshare - social posting via an API. We have a Social Media Bubble Plugin that makes this setup simple.

BTW: in your first image your have your secret key - suggest removing or blurring in the image

Having recent issues with this too, used to work fine.

Having just revalidated the token in run mode (debug_mode=true), the token seems to stay valid for only a few minutes before the error shows up again.

This is despite Linkedin dev portal showing that the access token is still valid.

image

The weird thing is that users still can authenticate successfully and even retreive emails via https://api.linkedin.com/v2/emailAddress?q=members&projection=(elements*(handle~))

The error seems to only impact getting the profile details (https://api.linkedin.com/v2/me)

Any help would be much appreciated!

1 Like

Perhaps it is a scope permission issue. Why emailAddress works.

In the LinkedIn dev portal check the scopes you are permissioned for and the required scopes for the calls.