2023 Oct 11 2:59 PM
I have an API to call and it uses OAuth2 / Bearer Token to authenticate the call.
The SAP Build Apps/Data/Create Data Entity allows a REST API entry but it does not have an entry for OAuth2.
I guess it could use a variable in the HTTP Header parameters but that means somewhere in my App I need to generate a Token and pass it.
Another option is OData integration, this has an Authentication Type for "Bearer Token", but it looks like the entry is a static value. Is it a variable and again how would I populate the variable?
the third option is a SAP BTP destination REST API. This uses a preconfigured BTP Destination. We can use this and the Token is generated by the Destination config, (so I don't have to think about it). But then its available to all the other BTP users which is a security risk.
Does anyone know how I should be setting up a Data Connection to an external API that needs OAuth2 authentication?
Thanks
Andy
2023 Oct 13 1:35 PM
I was looking at some blogs to find an answer to this, and as far as I can tell, there are some ways to accomplish this. See for example this blog and this sample in github.