databerry icon indicating copy to clipboard operation
databerry copied to clipboard

Whatsapp Business integration

Open gmpetrov opened this issue 1 year ago • 6 comments

Make an agent deployable in Whatsapp

gmpetrov avatar May 26 '23 20:05 gmpetrov

I'm interested in this integration and could help develop it. Do you have any documentation on how the others were developed?

Actually, we'd probably need to create an integration with Twilio or some Twilio-like service as I don't think WhatsApp APIs are publicly available.

ivfarias avatar Jun 09 '23 17:06 ivfarias

Hi @ivfarias, I have never played with the Whatsapp for Business API, but it seems that we can use it without another provider https://developers.facebook.com/docs/whatsapp/cloud-api/get-started

We don't have documentation for contributing on integrations yet, but you can take a look at the stripe and crisp integrations located here https://github.com/gmpetrov/databerry/tree/main/pages/api/integrations

gmpetrov avatar Jun 10 '23 15:06 gmpetrov

There's a new authorization solution for businesses https://developers.facebook.com/docs/facebook-login/facebook-login-for-business/

@OdapX can you check this API to see if we can use it to connect an Agent to a WhatsApp business account ?

gmpetrov avatar Oct 11 '23 13:10 gmpetrov

sure

OdapX avatar Oct 11 '23 13:10 OdapX

In the FB forum someone is talking about a workaround https://developers.facebook.com/community/threads/298104103046645/ https://github.com/keppelen/react-facebook-login/issues/326?fbclid=IwAR2wa3ozWCOTsBYxNBDL-uyrraoDhHNRZ6zhLsAvLyzbEYxYT4EBDyblKZY#issuecomment-1296703096

@OdapX Can you check if it solves the issue please

gmpetrov avatar Dec 25 '23 11:12 gmpetrov

@OdapX let's forget about the oauth implementation. There's some very annoying restrictions: "Businesses must use a new phone number to sign up for the platform, whether through manual onboarding or Embedded Signup. They are not able to sign up with a number that is currently active on WhatsApp or the WhatsApp Business App." https://developers.facebook.com/docs/whatsapp/embedded-signup

Let's do it the way typebot does https://docs.typebot.io/deploy/whatsapp/create-meta-app

To store the user API Token , we're going to add a new type for ServiceProvider "whatsapp_bearer_token" accessToken: XXX

In the setup form validate that the token is valid by calling a whatsapp api endpoint (todo: find one) Follow packages/integrations/zendesk/api/add.ts

gmpetrov avatar Jan 19 '24 13:01 gmpetrov