I'm facing an issue related to tasks in Oracle APEX.
I need to allow external users (non-authenticated) to access a public page without logging in. The idea is that they will access this page via a special link that includes a taskid parameter, and I use APEX_CUSTOM_AUTH.SET_USER() to set the user session programmatically so they can perform an action on the task.
Using the query:
SELECT * FROM TABLE(apex_approval.get_tasks(p_context => 'MY_TASKS'));
can see the task correctly.
However, when I try to complete the task, I get the following error:
ORA-20987: APEX - Complete Task: Not authorized
I’ve already tried using APEX_CUSTOM_AUTH.SET_USER() to set the user to match the ACTUAL_OWNER of the task (based on the taskid passed in the link), but it still doesn’t work.
Question:
How can I allow external users to take action on a task (e.g., approve or reject) without requiring login, by validating the request through a token or taskid in the link — even after setting the user with APEX_CUSTOM_AUTH.SET_USER()?
Any suggestions or guidance would be greatly appreciated.