Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Build Apps - API integration - OAuth2/Bearer Token

ACurtis
Explorer

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

1 REPLY 1

merituulimelkko
Product and Topic Expert
Product and Topic Expert
0 Kudos

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.