The Community forums are being phased out in favor of a new Slack group.
Add your email address below to get an invitation to join the community slack group

Slack Signup
Newsletter Optin
Help Desk

Authorization: Bearer with Formidable API add-on

Labels

This Discussion is public

Notifications

Hello everyone,I'm trying to send Formidable entries to an external service called Praktijkdata through the Formidable API add-on. However, I'm having issues with connecting to the server.

According to the documentation of Praktijkdata the authorization header should look like this:
Authorization: Bearer <installation id>:<api key>

I have tried various options in the Basic Auth field of Formidable API with the real installation ID and API key (I have replaced them by placeholders in the screenshot for security reasons), but I keep getting the 'Unauthorized Unauthorized request' response. It probably has to due with the 'Bearer' authentication method.

On the Formidable website I saw that you can customize the API request headers: https://formidableforms.com/knowledgebase/formidable-api/#kb-customize-api-request-headers Does anyone what the customized filter should look like in my case? I have attached the full documentation of the API. It starts in Dutch, but the instructions are quite universal.

Hope someone can point me in the right direction. Thanks in advance!


Attachments:

It's not possible to help diagnose the problem with the information you've provided. Do you know how to use the network tab in your browser's inspection tool? If you have that tab open when you test the connection, you can see the request that is sent to the server including the parameters and server response. You can change these details and resend the request right from the inspect tool. The level of diagnostics your challenge requires is beyond the scope of what I can provide as a community volunteer. Trying to send custom headers in an API call without actually knowing why the server won't accept your credentials is just guessing at the problem and taking a stab in the dark that it might work.

Hi Victor,

Thanks for your response. I have tested the API with Fiddler (see attached screenshot) and I was able to connect to the remote server and post a test, so the connection works fine. Just not in combination with the settings in Formidable API.

So right now I think I just need to know how to use the Bearer authentication in combination with the Formidable API.


Attachment:

That's exactly why I suggested using your browser's network inspection tool. This lets you see the parameters the add-on is passing to the server. You'll be able to see how things are formatted.

Alright, thanks for your feedback. I have attached the screenshots of the browser's network inspection tool (Firefox and Chrome). Any ideas what I should modify?


Attachments:

If you look at the key on the params screen, you're missing the word Authorization: and there appears to be a plus sign after the word Bearer.

Yes indeed. Here's a screenshot of my Formidable API settings. Should I change something here or do you have a recommendation for the customized header?

https://formidableforms.com/knowledgebase/formidable-api/#kb-customize-api-request-headers


Attachment:

You're missing the word Authorization: before the word Bearer in the Basic Auth field.

Just tried it, but it didn't work unfortunately.


Attachments:

I'm sorry. This is going to require a deeper level of troubleshooting than I can help you with as a community volunteer. Hope you can work it out.

Discussion closed.