Open denisroldan opened 3 weeks ago
Try this url in meta webhook {{base_url}}/webwook/meta/{{instance_name}}
If it still doesn't work, change the following code:
src/api/integrations/event/webhook/routes/webhook.router.ts
before:
.get('meta', async (req, res) => {
if (req.query['hub.verify_token'] === configService.get
return res.status(200).json(response); });
after:
.get(this.routerPath('meta'),async (req, res) => {
if (req.query['hub.verify_token'] === configService.get
return res.status(200).json(response); });
Try this url in meta webhook {{base_url}}/webwook/meta/{{instance_name}}
Didn't worked.
If it still doesn't work, change the following code:
src/api/integrations/event/webhook/routes/webhook.router.ts
before:
.get('meta', async (req, res) => { if (req.query['hub.verify_token'] === configService.get('WA_BUSINESS').TOKEN_WEBHOOK) res.send(req.query['hub.challenge']); else res.send('Error, wrong validation token'); }) .post('meta', async (req, res) => { const { body } = req; const response = await webhookController.receiveWebhook(body);
return res.status(200).json(response); });
after:
.get(this.routerPath('meta'),async (req, res) => { if (req.query['hub.verify_token'] === configService.get('WA_BUSINESS').TOKEN_WEBHOOK) res.send(req.query['hub.challenge']); else res.send('Error, wrong validation token'); }) .post(this.routerPath('meta'), async (req, res) => { const { body } = req; const response = await webhookController.receiveWebhook(body);
return res.status(200).json(response); });
I did the change, but it didn't work for me neither :/
Thanks for the quick response!
@DavidsonGomes maybe you can light up a bit here? I'm happy to help and contribute, but I have no clue why it's not working right now. 😅
Welcome!
What did you do?
After deploying Evolution 2.1.0 with postgres and redis, I created an instance using WABA official Cloud API. All the prerequisites are properly done and the account is working if, for example, I connect it directly to Chatwoot. Token is correct, number ID, business ID, etc. I'm even able to get the available HSM Templates through the Evolution API (GET
{{baseUrl}}/template/find/{{instance}}
).The problem is that, after registering the instance I receive:
And that URL is not working.
What did you expect?
The webhook should work as documented :)
What did you observe instead of what you expected?
When I go to facebook to register the webhook on my app, it doesn't work, showing an error. Also if I try doing it through the official Meta API I get:
Even if I try to do a GET request using postman to my Evolution instance, it returns a 404:
Screenshots/Videos
No response
Which version of the API are you using?
2.1.0
What is your environment?
Linux
Other environment specifications
GCP Instance using NVM, pm2, Postgres and Redis. Latest repo code on v2 branch.
If applicable, paste the log output
No response
Additional Notes
This is the route that's not responding https://github.com/EvolutionAPI/evolution-api/blob/v2.0.0/src/api/integrations/event/webhook/routes/webhook.router.ts#L35