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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

OpenAI connection fails in APEX installed locally on Mac

BilalJun 2 2025

I have installed Oracle APEX locally on my Mac using the Docker scripts from https://pretius.com/blog/oracle-apex-docker-ords/.

I set up the network ACLs in the FREEPDB1 PDB to allow APEX_PUBLIC_USER and my parsing schema (SWIFTCARE_APP) to connect to api.openai.com:443.

In APEX I created an HTTP‐Header credential (“Open_AI”) with:

  • Header Name: Authorization
  • Credential Secret: Bearer sk-…
  • Valid for URLs: https://api.openai.com/v1/*

Then I configured a Generative AI Service using that credential. However, when I test the connection, I am getting following error:

Also when I run:

DECLARE
  l_response CLOB;
BEGIN
  l_response := apex_web_service.make_rest_request(
                  p_url                  => 'https://api.openai.com/v1/models',
                  p_http_method          => 'GET',
                  p_credential_static_id => 'Open_AI'
                );
  DBMS_OUTPUT.put_line(l_response);
END;

ERROR: ORA-29273: HTTP request failed

Curl from inside the container works (returns HTTP 200 when I include the same Bearer header), so I know the key and network are fine. What configuration step could I be missing in APEX so that MAKE_REST_REQUEST still fails with ORA-29273?

This post has been answered by Bilal on Jun 3 2025
Jump to Answer
Comments
Post Details
Added on Jun 2 2025
3 comments
113 views