chatwoot icon indicating copy to clipboard operation
chatwoot copied to clipboard

Add Whatspp Cloud API unnoficial option

Open clairton opened this issue 3 years ago • 8 comments

Whatsapp Cloud API unnoficial option

Add field in form Inbox type Whatsapp Cloud Api with default url to https://graph.facebook.com and a method whatsapp_cloud_api_unofficial? to compare this url to verify if message cloud be send

Type of change

  • [ ] New feature (non-breaking change which adds functionality)

How Has This Been Tested?

This feature is possible use whatsapp with https://github.com/adiwajshing/Baileys ou any project implementing a whatsapp cloud api layer without error on Whatspp Cloud API Official

clairton avatar Jul 28 '22 17:07 clairton

I think this is an ample compromise for now thanks @clairton

smashah avatar Jul 28 '22 17:07 smashah

@smashah the implemetation this layer, is not part of chatwoot, but this small changes is chatwoot could help much =)

clairton avatar Jul 28 '22 17:07 clairton

I think the implementation detail should be left to middle API layer. Let the onus be on the third party projects to replicate the API of the official API.

Otherwise this PR will only work with Baileys.

smashah avatar Aug 01 '22 21:08 smashah

I use Baileys, but anywhere could implement with another lib, the condition is the rest api format is the same format of request of whatsapp cloud api. And in the chatwoot the only change necessary is a field do put a url, with default value is the graph.face....

clairton avatar Aug 02 '22 00:08 clairton

Hi guys, is everything ok with this PR?

clairton avatar Aug 16 '22 11:08 clairton

Hi guys, is everything ok with this PR?

Good Morning!

Do you have the format of responses that Baileys for chatwoot? Because the reverse can the webhook.site. If you can share I would be grateful. [email protected]

Thanks

jeovajireh avatar Sep 15 '22 10:09 jeovajireh

Hi guys, is everything ok with this PR?

It's no use, I tried making the changes in the code and nothing changed and I tried using your repository and it gave an error.

Thanks

jeovajireh avatar Sep 17 '22 13:09 jeovajireh

Hi The comunication between baileys and chatwoot with WhatsApp cloud api needs a layer implementation witch translate the baileys format to WhatsApp cloud api format. This PR just change the url to use the unnoficial implemation layer

clairton avatar Sep 17 '22 14:09 clairton

Deploy Preview for chatwoot-storybook ready!

Name Link
Latest commit acc624d85a1ea031edfb7ebfdf570d26cc3c3f97
Latest deploy log https://app.netlify.com/sites/chatwoot-storybook/deploys/6404a168c0bef10008d1b15f
Deploy Preview https://deploy-preview-5142--chatwoot-storybook.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

netlify[bot] avatar Jan 18 '23 19:01 netlify[bot]

@clairton We will look into this PR once the product team has more bandwidth. Ideally, we want to keep official channels thoroughly flushed out and working end to end. We prefer the API channels for cases where you need to have some level of developer involvement.

ref: https://github.com/chatwoot/chatwoot/discussions/2759

sojan-official avatar Jan 19 '23 09:01 sojan-official

@sojan-official this PR no implement a new feature and not breaking the current funcionality

The unique change is possible change https://graph.facebook.com/ do https://mydomain.com

Captura de Tela 2023-01-18 às 17 12 58

clairton avatar Jan 19 '23 15:01 clairton

This may cause confusion to everyday users. Maybe hide the extra config behind an advanced toggle?

smashah avatar Jan 19 '23 16:01 smashah

This may cause confusion to everyday users. Maybe hide the extra config behind an advanced toggle?

Captura de Tela 2023-02-10 às 09 49 31 Captura de Tela 2023-02-10 às 09 49 36

clairton avatar Feb 10 '23 12:02 clairton

Hi guys, is everything ok with this PR?

Good Morning!

Do you have the format of responses that Baileys for chatwoot? Because the reverse can the webhook.site. If you can share I would be grateful. [email protected]

Thanks

This is a WIP yet

https://github.com/clairton/baileys-cloud-api

clairton avatar Mar 04 '23 19:03 clairton

WIP project to integrate https://github.com/clairton/baileys-cloud-api

clairton avatar Mar 05 '23 14:03 clairton

Hey @clairton, thanks for the contribution. At the moment, this change does not exactly fit our product vision, but there's certainly some interest in the community about this, as evident by the PR, so it makes sense to allow Chatwoot users to change this.

However, having this available within the UI as a configuration does burden the project's maintainers and also impacts the UX of the product by exposing a configuration in the UI that is not relevant to most of the users; I suggest allowing this to be an installation-level configuration injected via environment variables. We have already done something similar here: https://github.com/chatwoot/chatwoot/blob/9c9183a35214f0ddbb7aa425178672335c049a3b/app/services/whatsapp/providers/whatsapp_360_dialog_service.rb#L52

Let us know what you think of it!

scmmishra avatar Mar 07 '23 13:03 scmmishra

Awesome! I open new PR #6622

clairton avatar Mar 07 '23 19:03 clairton

@clairton Thanks for the update. Closing this in favour of #6622

sojan-official avatar Mar 08 '23 12:03 sojan-official

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

github-actions[bot] avatar Apr 07 '23 12:04 github-actions[bot]