in the company where I work we have tried to integrate the Hubspot API through OAuth, however, we have not been successful in capturing the code that is generated after logging into hubspot and generating the tokens for the session.
We have tried using the Oracle configuration for handling tokens that APEX brings, it has been configured with the PL / SQL code to obtain the information and through Javascript and with none of these has been possible. Attached photos of what has been done. It should be noted that testing in Postman works since at some point we thought that we had configured something wrong in hubspot but that is not the case.
apex_web_service.g_request_headers.DELETE();
l_clob := apex_web_service.make_rest_request(
p_url => 'https://app.hubspot.com/oauth/APP_ID/authorize?client_id=MyCODEb&redirect_uri=MY_CallBack&scope=oauth accounting',
p_http_method => 'GET'
);
v_status := apex_web_service.g_status_code;
:P2_NEW_1:= v_status || '- GET';
The code above launches the home screen in Hubspot however it fails to capture the code it generates and throws an authentication error.