Ngaphandle kwako konke ukukhuselwa kwedatha, i- WhatsApp iseyeyona nto iyintandokazi yomthunywa waseJamani. Ukongeza kwi- App ye-WhatsApp yoShishino olukhethekileyo, i-Facebook ikwenze i-interface esemthethweni, i-API yeShishini yeWhatsApp, ukuyenza ukuba inomdla ngakumbi kwiinkampani. Ukuba ufuna ukuthumela imiyalezo ye-WhatsApp ngokwenkqubo yesicelo sakho sewebhu, zikho nezinye iindlela.
Indlela esemthethweni yokubathumela API kuWhatsApp Business: Ukuba ufuna ukusebenzisa oku ngqo, kufuneka ubhalise udidi lwecebo zaseburhulumenteni iqabane womnatha . I-MessageBird , umzekelo, izibonakalisile apha. Ngaphandle kokungena kwiinkcukacha ezichanekileyo, ndiza kukubonisa ezona zinto zibalulekileyo zokuthatha apha:
- Njengemfuneko, kufuneka ube nenombolo yeselfowuni esemthethweni edityaniswe kwisicwangciso sedatha ye-WhatsApp.
- Ukuthumela imiyalezo kuxhomekeke kuthintelo olungqongqo: Ukuthumela abafowunelwa bangaphandle kunokwenzeka kuphela kusetyenziswa oko kubizwa ngokuba ziitemplate zemiyalezo , ekufuneka ingeniswe kwaye yamkelwe ngesandla. Ukuba iimpendulo zoqhakamshelwano, ungathumela nayiphi na imiyalezo kulomfowunelwa nge-API ngaphakathi kwewindow yeeyure ezingama-24.
- Ufuna ukungena kwi-intanethi ngokuchanekileyo, ekufuneka uyiphumeze ngokwakho.
- Imirhumo evela kumboneleli weqela lesithathu ifaka isicelo kumyalezo ngamnye othunyelweyo.
Eyona fowuni ye-API kumyalezo we-MessageBird (ngoncedo lwe-_curl kwi- stringhelper ) ibonakala ilula:
e228243e9ffff5f83e71190ee38b10aa
Ukuba uneserver yakho kwaye (ayisetyenziswanga ngokufanelekileyo) ifowuni ephathekayo, kukho enye indlela yokufezekisa into oyifunayo kunye nokuthintela ezi zithintelo zingasentla. Apha usebenzisa ukusebenza kweWebhu yeWhatsApp . La mathala eencwadi mabini alandelayo anokusetyenziselwa le njongo.
Isisongeli seWebhuWhatsapp kudala sikhona kwaye sisekwe kwiPython naseSelenium. Ukuthumela imiyalezo kusebenza ngolu hlobo lulandelayo, umzekelo:
452590a6d20c1fa9276ff14ed28c4ce5
I- Baileys encinci encinci , kwelinye icala, isekwe kwi-TypeScript nakwi-WebSocket. Imiyalezo ithunyelwa kusetyenziswa le khowudi ilandelayo njengomzekelo:
e0187d6da1f800b1597420345d13b432
Omabini la mathala eencwadi asebenza kumgaqo ofanayo: usetyenziso lwewebhu lulawulwa kude, ubunyani bufuneka kube kanye (iseshoni ibuyiselwe kwixesha elizayo xa ibizwa). Akukho zithintelo (xa kuthelekiswa nomyalezo oqhelekileyo wokuthumela).