API Connector - Linkedin login Token

Did you check scopes?

1 Like

LinkedIn allows me to sign in and accept the scopes that I send in the AUTH, but when it redirects back to my app’s page, it returns that error

1 Like

Could you share some screenshots of the process and if you tried on another app for the purpose of debugging?

Yes, but if you don’t have scopes to access user info, you will get unauthorized to the endpoint entered in user info field.

1 Like

Here are screenshots of the relevant plugin configuration, my LinkedIn definitions for the app, the login and the authorization pages, and the error popup that is displayed after redirection back to the app:






Full details of the error that I get when I open in the bubble debugger:
API Connector error: the Oauth2 API LinkedIn AUTH login is not configured properly - Received error from api The service this service just returned an error (HTTP 403). Please consult their documentation to ensure your call is setup properly. Raw error:

Unauthorized html, body, pre { margin: 0; padding: 0; font-family: Monaco, 'Lucida Console', monospace; background: #ECECEC; } h1 { margin: 0; background: #333; padding: 20px 45px; color: #fff; text-shadow: 1px 1px 1px rgba(0,0,0,.3); border-bottom: 1px solid #111; font-size: 28px; } p#detail { margin: 0; padding: 15px 45px; background: #888; border-top: 4px solid #666; color: #111; text-shadow: 1px 1px 1px rgba(255,255,255,.3); font-size: 14px; border-bottom: 1px solid #333; }

Unauthorized

You must be authenticated to access this page.

I tried this redirect link as well as the generic redirect link, and also different scopes of permission, but I get the same error back. Any ideas?

Have you tried with “openid” instead of “profile” scope?

Hard to see, please check the following article: How to create a sign-in via LinkedIn and collect the primary email address on Bubble | by Shenal Harakh | Medium

Although not possible for photo and name, rather linkedin email and id (which my app also uses with no issues)

@another Tried all combinations of scopes. None worked. Even tried setting up a new App in LinkedIn with only the openid functionality added. Still the same results. Followed the tutorial you sent in the link. Maybe OAUTH needs to be configured differently if my app is given the openid permission, I don’t know, but I didn’t find a way to only get the r_liteprofile permission granted.

1 Like

The error says it’s on the API Connector side. Can you please follow the steps from the link and thread shared previously, make sure to copy/paste texts, rather of writing it manually, also for API connector to be on the latest updated version, Linkedin auth to be right with the API Connector.

Do you have any workflow’s after in relation, as it seems the Linkdin auth passes, and when it comes back to the app’s loggin page, the issus arise?

I followed everything to the letter. I tried every variation I could think of and even updated to conform to the recent changes made by LinkedIn (use openid scope and profile endpoint). I also created a new page in the app that only has a button and an alert. The button tries to login and the workflow only shows an alert afterwards. Nothing works. It keeps coming back with the message, you have to be authenticated.
I tried logging in with Postman and managed to do it but it didn’t work until I changed the option Client Authentication to “Send client credentials in body”. It then returned an Access Token that I used in a different GET call to retrieve the profile and the image successfully. The callback url Postman uses is “https://oauth.pstmn.io/v1/browser-callback”.
These are the settings of the authorization in postman:

This is the subsequent GET call that I use to retrieve profile (it works):

I really can’t figure out what the problem is.

1 Like