Action to Store the Auth0 user id in a remote system doesnt work..?

Hello,

I’m attempting to use the Action that Stores the Auth0 user id in a remote system.

However, it doesn’t work. The error I get is simply:

“Error! API Error. Please contact Auth0 if error persists.”
Below this message, the second error message just shows up as a blank object: “Error: {}”

Here is my test code, which is completely based off of the example given by Auth0:

const axios = require("axios");

exports.onExecutePostUserRegistration = async (event) => {

  await axios.post("postgres://<my_environment_name>:<my_password>@john.db.elephantsql.com/<database name>/<table name>", { params: { email: event.user.email }});

};

I have set up my database exactly as per the instructions noted here. It is a web-based Elephant PostgresSQL database.

Note that the step to Create a user and send to that same external database works just fine for me (under Authentication, non Action- based). So, does the problem lie somewhere within the Actions API?

Can anyone else get this to work?

Thanks and Regards,

1 Like

I’m trying this integration right now… but haven’t gotten it to work yet…

Hey there!

As this topic is related to Actions and Rules & Hooks are being deprecated soon in favor of Actions, I’m excited to let you know about our next Ask me Anything session in the Forum on Thursday, January 18 with the Rules, Hooks and Actions team on Rules & Hooks and why Actions matter! Submit your questions in the thread above and our esteemed product experts will provide written answers on January 18. Find out more about Rules & Hooks and why Actions matter! Can’t wait to see you there!

Learn more here!