I want to connect to a bank API with my Mendix app, but is secured with OAuth2.
I can't find documentation about how to securely connect a user to such an API. Has anyone done it and if yes, how?
You can authenticate with OAuth2 – I just built a Microsoft Graph integration using (Microsoft’s version) of OAuth2.
I used the following from the appstore: URL Redirector, Model Reflection, Deeplink
The general steps are as follows:
For reference, the DeepLink I defined for step 2 looks like this:
Also, it has the query params because the microflow looks like this:
The string params of the microflow are used as the query params of the Deeplink.
Hope that will help you get you started.
I did build a microflow that executes OAuth authentication a few months ago using a standard REST call with POST method, here is my example:
The input values were not as straight forward as I thought, I tested it for a while using postman before finding the correct values. For example, the request body required an extra field “undefined” but I cannot find the notes explaining why:
I hope that helps.
What exactly are you running into?
You should be able to perform the authorization calls using a consume REST Service activity in Mendix: https://docs.mendix.com/howto/integration/consume-a-rest-service
How the OAuth2 specifically works it not really specific Mendix question, I think there's enough to find about that on the internet…