Matthew Wells
Matthew Wells

Reputation: 113

Is it possible to set up a REST data source on apex.oracle.com with OAuth2?

I'm attempting to add a REST data source from Xero.com to my app on apex.oracle.com. I've confirmed my credentials work properly when connecting to Xero's Oauth2 api from elsewhere, but I can't connect from the REST data source wizard. I suspect this is because the authorized redirect URI I am providing to Xero is incorrect. I have been providing the URL "https://apexea.oracle.com/pls/apex/apex_authentication.callback" as recommended by this guide.

Is there another callback URL I should be using, or, if not, another method then the REST data source wizard by which to connect?

Upvotes: 1

Views: 756

Answers (1)

Carsten
Carsten

Reputation: 1114

Out of the box, REST Data Sources only support the OAuth2 "Client Credentials" flow, which does not involve any browser redirects. For redirect-based OAuth flows like "Implicit Grant" or "Authorization Code", there is no declarative access; so you would need to implement custom PL/SQL code in order to get the token. Also the callback endpoint would beed to be provided by you, e.g. as a REST service or an "AJAX Callback".

Upvotes: 3

Related Questions