Trying to use API Connector for NiceinContact.com

I have been wrestling with this oath2 API for hours.

Here is the API info: https://developer.niceincontact.com/Documentation/GettingStarted

I am able to use User-Agent Flow. I hooked up a login workflow. It gets me to the authentication page, I am able to enter username and password (for Nice inContact). Then I get the Grant permissions page. It then returns to my app page and a window pops up that says “API Connector error: the Oauth2 API New Test is not configured properly - incorrect header check”.

I have been over and over this thing. I used Postman to validate and it works.

Any ideas?

I am pretty sure I am getting a valid response to the API. See screen shot. The authentication seems to work fine and then it returns to the bubble app screen. Then, maybe it is trying to run the actual API GET (https://api-C15.incontact.com/inContactAPI/services/v13.0/realtime/skills/activity). Is there a header issue with that?

Here is a screen shot of API Configuration:

what happens when you sign in to try it out on the Nice InContact DEVone https://developer.niceincontact.com/API/RealTimeDataAPI#/RealTime/SkillActivityById do you get the activity retured for a skill

You should not have any Shared header with authorization because you handle authorization part with Bubble. Also, the Bearer is bearer in their doc. You also need to have access to an endpoint that will return the authenticated user data with an email field and ID field. I didn’t found one but you may ask niceincontact to know if there a way to get it and put this endpoint in User profile endpoint.

After that, you need to create a page with a button to login on social network and in debug_mode to be able to initialize call in API Connector.

Yes, when I login to the dev site, I can test the API and I get good data.

I tried to use the password oauth2, but I get the same “incorrect Header Check”. Do I put the fields that are supposed to go in a json body as parameters? I tried that, but still got error.

When after the grant permissions page is clicked, the workflow uses the Generic Bubble.io return URL to get back to the app page. In the url in the browser is perfectly formed return data from the inContact API. There is a token along with all the other fields. But, the app page gives the “incorrect header check”. I feel like the API is returning the access token, but my workflow doesn’t know what to do with it. I have something configured incorrectly, I am sure. I just can’t find it.

Like I told you, there’s a lot of thing to change to make it work with oAuth2. Did you get the endpoint to get authenticated user info?

Is that the User Profile Endpoint? No, if that is the issue, then I need to figure that out. I have the authenticate and token URL.

Kurt

Exactly. Bubble need this with oAuth2.
IF you don’t have this, you need to self handled all the oauth2 process.

Are there any ready examples of configuration examples for self handled OAUTH2?

Thanks for the info, by the way. I really appreciate it.

Kurt

if that sentence structure is any indication, I have been heads down on this for too many hours. lol!

There’s a few example in the forum here. Most of the time is that you need to create a link with the authorize part, a Workflow on page load that detect if url parameter contains code and act as the callback url and an action flow that complete the Token part. But may also need to handle refresh token using scheduled workflow or evaluation if the access token is expired before doing a call.