Posts tagged with whatsapp-cloud-api

I'm using this package to send messages on WhatsApp Business, but when I try to use it i get this error:

{"error":{"message":"Unsupported post request. Object with ID 'messages' does not exist, cannot be loaded due to missing permissions, or does not support this operation. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api","type":"GraphMethodException","code":100,"error_subcode":33,"fbtrace_id":"AZy2DQf7fRL003f1RJcY8Kf"}}

I tried changing the token many times and also switching phone numbers. What can I do?

Here's what i did:

Added this to config/services.php:

 'whatsapp' => [             'from-phone-number-id' => env('WHATSAPP_FROM_PHONE_NUMBER_ID'),             'token' => env('WHATSAPP_TOKEN'),         ], 

Added application token and phone number id inside .env:

WHATSAPP_FROM_PHONE_NUMBER_ID=XXXXXX WHATSAPP_TOKEN=XXXXXX 

And then I created a notification class in Laravel like the instructions said and used the notification facade to send the message.

I just tried using the notify method of the Notifiable Trait like this:

Route::get('/wa', function () {     $user = User::find(4);     $user->notify(new AppuntamentiPazienti());     return view('homepage'); }); 

but i got the same error.

We are building a platform for WhatsApp business messaging. For this, we need to test the product catalog messaging APIs.

However, it seems there is no way to do so without creating a public business account and adding a payment method.

Is there a means to access the APIs without going through the above steps? Especially the payment method as we do not wish to start paying for testing our product before going live.

We have created a product catalog and connected it to the WhatsApp business account on an actual phone number. But we cannot send messages without adding a payment method.

we've successfully set up a Whatsapp API account and can programmatically receive (soon send) messages. However, I'd like to link the same account to phone/web to easily read/send/receive messages without making use of a third party tool.

If it's impossible to do so via WA web/mobile, is there self-hosted open source UI alternative?

Was expecting to still be able to link a business manager/API account to mobile/Whatsapp web. Not possible.

I'm implementing the WhatsApp Cloud API, one of the steps to do it it's subscribe to webhooks and verify them using three parameters: hub.mode, hub.challenge and hub.verify_token.

We have tried sending webhook tests from several sources and tools to send petitions to the API and we have also sent messages to the WhatsApp account that is being handled by the API, and in none of these tests the Hub parameters are appearing. As it's shown in the image, we are expecting the parameters are shown in a Get array.

This is how the log is looking in my Callback URL

array ( )POST GETarray ( 

This is how the log should look

array ( )POST GETarray (   'hub_mode' => 'subscribe',   'hub_challenge' => '<challenge number>',   'hub_verify_token' => '<token>', ) 

The query string and the request URI should show the hub parameters too, but it doesn't.

What are we missing?

Reading Facebook's documentation, there are various levels of limits for the messages a business can send in 24 hours.

1K business-initiated conversations
10K business-initiated conversations
100K business-initiated conversations
An unlimited number of business-initiated conversations

What I need via an API call is the current limit and the number of messages sent in 24 hours, so I can halt any further sends from my application if the limit is nearly reached. Do you know what API call should I execute in order to get the limit?

At the moment, the only API call that comes close to this result is the following:

GET https://graph.facebook.com/v17.0/{phone-number-id}/phone_numbers?access_token={access_token}

the API call returns this JSON:

{     "data": [         {             "verified_name": "{company-name}",             "code_verification_status": "EXPIRED",             "display_phone_number": "{company-number}",             "quality_rating": "GREEN",             "platform_type": "CLOUD_API",             "throughput": {                 "level": "STANDARD"             },             "webhook_configuration": {                 "application": "{webhook-url}"             },             "id": "{phone-number-id}"         }     ] } 

but what I except is something like this

{   "id": "your-phone-number-id",   "quality_rating": "GREEN",   "message_limit": 1000,   "next_limit_reset_timestamp": "2024-06-06T00:00:00Z",   "tier": "TIER_1" }