I have created a webhook which should get triggered when a new user is created.
But the webhook api url is not getting triggered when a new user gets created. I am using Next.js and Docker Desktop to test this.
The issue was resolved when the user realized they were using oAuth, which caused the webhook to not work. The webhook was only triggered for the `account.create` method and any Users create functions, not for creating users with OAuth2. Additionally, the user discovered that if they set the event as users*, it worked, but if they set it as users.*.create, it didn't work. They also learned that using `localhost` as the target for the webhook can be problematic and that they should pass the computer's local IP instead.
Binyamin
Aug 2, 2023, 03:34
The use of localhost as target for the webhook can be problematic as the localhost would be some internal ip within the worker container.
What I mean is that the webhook is being trigger but it cal is own localhost and the one you have outside.
If you want to set the webhook in local environment you can pass the computer local IP
Binyamin
Aug 2, 2023, 03:35
You can find the machine internal IP bu running ifconfig in unix systems or ipconfig in windows
Vishal Lohar
Rank 2: Process
Aug 2, 2023, 09:17
Got it. Now its working
Vishal Lohar
Rank 2: Process
Aug 2, 2023, 09:17
The problem is its working if the event is users* . And if I set it to users.*.create then it doesn't work
Vishal Lohar
Rank 2: Process
Aug 2, 2023, 09:18
Am i doing something wrong? I want to trigger the api only when a new user is created
Binho.dev 💙
Aug 2, 2023, 13:04
Hay 👋
I use users.*.create to receive webhook notifications and send messages via WhatsApp, it works normally.