Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Unable to create web source module for rest api that needs URL parameters for authorisation

Mint-InnitJul 21 2020 — edited Jul 26 2020

Hi, I've used web source modules before (though not a huge amount).

I am currently unable to create one for the open weather onecall API, namely:

https://openweathermap.org/api/one-call-api

which requires a url of the format:

https://api.openweathermap.org/data/2.5/onecall?lat={lat}&lon={lon}& exclude={part}&appid={YOUR API KEY}

Using my API key I have no trouble calling this and receiving data in Postman, but I cannot get the web service module wizard to work. It demands authentication for the call, and won't let me past to just specify the URL parameters. I am using the free cloud tier to experiment with this, which is now at apex 20.1. There's no option to turn off authorisation required despite the documentation saying otherwise. There doesn't seem to be a way to just manually create the module - it won't let me get past the 'requires authentication' stage...

I am not sure if the problem is I'm simply choosing the wrong path through the wizard. Whichever route I take always ends in:   Server responded with HTTP 401: Unauthorized {"cod":401, "message": "Invalid API key. Please see http://openweathermap.org/faq#error401 for more info."}

So whatever I try the appid parameter is not getting through to the api, OR it is not in the correct format or something...

It is getting late, I might try the web service PL/SQL api tomorrow night to see if I can get that to work instead.

If anyone has any ideas that would be great :-)

Cheers.

Comments
Post Details
Added on Jul 21 2020
1 comment
236 views