skip to Main Content

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.

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

3

Answers


  1. Edited

    WhatsApp cloud API is Now Public!

    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. Select the "Business" type and follow the prompts on
      your screen.
    4. From the App Dashboard, click on the app you would like to connect
      to WhatsApp. Scroll down to find the "WhatsApp" product and click
      Set up.
    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. You can use this test phone number to explore the WhatsApp Business Platform
      without registering or migrating a real phone number.

    for more info please refer to whatsapp cloud getting started docs

    Login or Signup to reply.
  2. Yes, WhatsApp Cloud API is now public.

    With the Cloud API, businesses can directly get access to WhatsApp Business API from Facebook, in minutes.

    For more info check out this WhatsApp Cloud API Guide.

    Login or Signup to reply.
  3. 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.

    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

    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

    Installation

    composer require zepson/whatsappcloud-php
    

    Here how the code to send a message;

    <?php
    
    require_once 'vendor/autoload.php';
    use zepsonWhatsappWhatsappClass;
    
    $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);
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search