简体   繁体   English

whatsapp 云 api 启用 whatsapp_business_messaging 权限

[英]whatsapp cloud api enable whatsapp_business_messaging permission

i have been trying to send whatsapp messages using cloud api, but its expecting to enable whatsapp_business_messaging permission which is by default disabled when associating with any app that has been created.我一直在尝试使用云 api 发送 whatsapp 消息,但它希望启用 whatsapp_business_messaging 权限,该权限在与任何已创建的应用程序关联时默认禁用。

https://developers.facebook.com/docs/whatsapp/cloud-api/get-started#get-access-token . https://developers.facebook.com/docs/whatsapp/cloud-api/get-started#get-access-token

i didn't find any documentation pertaining to enable the above mentioned permission.我没有找到任何有关启用上述权限的文档。 Kindly assist请协助

Edited已编辑

WhatsApp cloud API is Now Public! WhatsApp 云 API 现已公开!

According to their docs,根据他们的文档,

To start using it for development prepose开始使用它进行开发前置

  1. Register as a Meta Developer 注册为元开发者
  2. Enable two-factor authentication for your account 为您的帐户启用双重身份验证
  3. Create a Meta App : Go to developers.facebook.com > My Apps > Create App. 创建元应用程序:Go 给开发人员。facebook.com > 我的应用程序 > 创建应用程序。 Select the "Business" type and follow the prompts on your screen. Select “业务”类型并按照屏幕上的提示进行操作。
  4. From the App Dashboard, click on the app you would like to connect to WhatsApp.在 App Dashboard 中,单击您要连接到 WhatsApp 的应用程序。 Scroll down to find the "WhatsApp" product and click Set up.向下滚动以找到“WhatsApp”产品,然后单击设置。
  5. the onboarding process performs the following actions:入职流程执行以下操作:
  • our App is associated with the Business Manager that you chose我们的应用程序与您选择的商务管理器相关联
  • A WhatsApp test phone number is added to your business. WhatsApp 测试电话号码已添加到您的业务中。 You can use this test phone number to explore the WhatsApp Business Platform without registering or migrating a real phone number.您可以使用此测试电话号码探索 WhatsApp Business Platform,而无需注册或迁移真实电话号码。

for more info please refer to whatsapp cloud getting started docs有关更多信息,请参阅whatsapp 云入门文档

Yes, WhatsApp Cloud API is now public.是的,WhatsApp Cloud API 现已公开。

With the Cloud API, businesses can directly get access to WhatsApp Business API from Facebook, in minutes.借助 Cloud API,企业可以在几分钟内直接从 Facebook 访问 WhatsApp Business API。

For more info check out this WhatsApp Cloud API Guide .有关更多信息,请查看此WhatsApp Cloud API 指南

I recently made an open-source python wrapper for newly WhatsApp Cloud API to help developers easily get started, You really wanna have a look at it https://github.com/neurotech-HQ/heyoo .我最近为新的 WhatsApp Cloud API 制作了一个开源 python 包装器,以帮助开发人员轻松上手,你真的想看看它httpsy://github.com/neurotech/he

Installation安装

pip install --upgrade heyoo

Here is the sample code to send a message;这是发送消息的示例代码;

>>> from heyoo import WhatsApp
>>> messenger = WhatsApp('TOKEN',  phone_number_id='104xxxxxx')
>>> messenger.send_template('hello_world', 'your number')

For Javascript developers please have a look into Heyhooh对于 Javascript 开发人员,请查看Heyhooh

Installation安装

npm install heyooh

Here how sending to send messages;这里如何发送发送消息;

import WhatsApp from heyhooh
let messenger = new WhatsApp('TOKEN',  phone_number_id='104xxxxxx')
messenger.send_template("hello_world", "255757xxxxxx")

For PHP Developers whatsappcloud-php对于 PHP 开发人员whatsappcloud-php

Installation安装

composer require zepson/whatsappcloud-php

Here how the code to send a message;这里的代码如何发送消息;

<?php

require_once 'vendor/autoload.php';
use zepson\Whatsapp\WhatsappClass;

$token = 'YOUR_META_WHATSAPP_APP_ACCESS_TOKEN';
$phone_number_id = '10726082513218961';
//send message
$tsap = new WhatsappClass( $phone_number_id, $token);

$sendtsap = $tsap->send_template('hello_world', '255654485755');
 
print_r($sendtsap);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM