Oauth2 User Profile Endpoint returning Access Token Instead

A bit of a long shot but has anyone had an issue with the User Profile Endpoint in OAuth2 in API connector. I am receiving an error: “The service did not return an ID for the user. The user cannot be logged in…”

The error also shows the raw JSON data where I assume it is looking to find the User ID key path.

However, the JSON data is from the Access Token Endpoint not the User Profile Endpoint.

Funny enough I can get it to work by creating a plugin instead of using the API connector. However, when I deploy that plugin to an app I get the same error?

1 Like

Hi @realisedgains I had the same issue, it depends on the integration you’re trying to setup. Some apps don’t provide a userID, or you might not have the right URL in your user profile endpoint. What app are you trying to connect to?

Make sure you have the right User Profile Endpoint (use PostMan to run it manually using a token).

Point User Id Key path at something unique to this user in the return JSON. You may need to navigate a level or two to get to it.

Thanks for the replies @ambroisedlg and @NigelG.

This api doesn’t provide a userID but there is another unique field that I am using which is unique to the User. This field works OK in the plugin editor when I need to authenticate and then initialize the calls. This makes me confident it is an OK endpoint URL and unique field to use. Did it work for you in the plugin editor @ambroisedlg?

Unfortunately if I use the exact same settings in the app via API connector it doesn’t work. The error message JSON shows the Access Token instead of the response from the URL I put in the User Profile Endpoint.

It looks like I will end up trying the manual oauth route but I was hoping to avoid it.

@realisedgains I didn’t try building it via a custom plugin to be honest. As the integration I was trying to build didn’t provide a userID as well, I used the API Connector with the None or self handled method, with the help of @NigelG among others back in the days

See this thread, it might work for you too: [Showcase] Manual OAuth2 Token Integration

Thanks @ambroisedlg. That will be quite helpful if I go with a manual option.

@realisedgains were you ever able to figure this one out?

I am running into exactly the same issue while trying to connect to teamwork.com.

Thanks,

No sorry I went with the self handled option like others.

@realisedgains that is unfortunate, was hoping to avoid that.

But really appreciate the quick response. Thanks for that.

I am reaching out to Bubble support as well since it seems odd in my case to have to go the manual route since the information I am getting back does actually contain the user.

Let’s see

Hey @sjeftijssen this is something we can help you with :slight_smile: Let us know if you want Teamwork to be added to our list of providers…

Exactly the same issue here :grimacing:
I also tried to use something unique instead of the id but still the same error. I wonder if Bubble ever had a response to this issue since this has been over a year now? :thinking:
thanks

Amen! I was hoping to avoid the manual route too. Did you manage to get it working in the end? Also, has bubble ever responded to you? Thanks