I have been using a Twilio phone number connected to a WhatsApp Business Account.

As far as I understand, for each conversation started, WhatsApp gives me a 24-hour window where I can send and receive any number of messages without additional charges (WhatsApp Conversation - Free Tier). However, it seems that I am somehow incurring in additional charges for each message sent and received (Messaging Channels Inbound Message and Messaging Channels Outbound Message where each costs $0.005).

I configured the WhatsApp sender to work with a webhook redirecting to an Azure Function App running Python Flask. Despite I can answer an incoming message via a Python Flask, I chose answering via the Twilio REST API (from twilio.rest import Client), since the webhook method gives me only 15 seconds to send an answer or it cuts the connection throwing error 11200, and some of my processes take longer than that.

Are this extra costs because I am using the Twilio REST API or is this a normal behavior of Twilio WhatsApp?

I am working on implementing a custom WhatsApp API integration to send verification codes to users on WhatsApp. I have already been approved for access to the WhatsApp Business API and obtained the necessary credentials.

Now, I want to send verification codes to users through WhatsApp using my custom integration. But I don't have any idea that how to do that?

I just wanna know How do I generate a random verification code in my application without getting any bugs?

And also I wanna know Which WhatsApp API endpoints should I use to send the verification code as a text message?

I was expecting a the most suitable way to do these things without getting any bugs

I've made a script that runs on the Google Ads API. The project on console.cloud.google.com is configured as "External" and "In Testing". The script I'm talking about needs to be run daily on a cron job. Issue is, every week I have to get a new refresh token manually, which is unnecessary in my opinion. So, is there a way to get a new refresh token without needing a user pressing "Continue" and "Accept", i.e. verifying that they allow access to Google Ads? Or does that only happen when I Publish my app on console.cloud.google.com?

So far, I either put the refresh token into the script and it works or (in another script) I use the refresh token to cURL into https://oauth2.googleapis.com/token to get an access token.

For a week now I have been crawling the web but haven't find any legit documentation to connect the python librairie for Ads API with Service Account.

I want to create a micro-service, server-to-server, so anything else apart service account as authentication is off-table.

On GCP, I was using oAuth2 but I had to manually refresh the tokens with https://developers.google.com/oauthplayground/ which isn't a viable solution.

What I have done so far :

  1. I created a service account
  2. generated a key to it in JSON and downloaded it.
  3. Add all possible access to my service-account permissions, such as :
  • Owner
  • Security Reviewer
  • Service Account Admin
  • Service Account Key Admin
  • Service Account Token Creator
  • Service Account User

4 - Created my script to authenticate :

from google.ads.googleads.client import GoogleAdsClient credentials = {                 "developer_token":  "xXxxxXxxxXxxXXXXxXxxX",                 "use_proto_plus":  true,                 "json_key_file_path":  "./path_to_json.json" ,                 "impersonated_email":  "gcp_and_ads_admin_email",                 "login_customer_id":  "XXXXXXXXXX"             } client = GoogleAdsClient.load_from_dict(credentials) 

When I execute my script, this error follows :

google.auth.exceptions.RefreshError: ('unauthorized_client: Client is unauthorized to retrieve access tokens using this method, or client not authorized for any of the scopes requested.', {'error': 'unauthorized_client', 'error_description': 'Client is unauthorized to retrieve access tokens using this method, or client not authorized for any of the scopes requested.'})

Does anyone know how I can find a tutorial or help me with this please ?

How can I integrate my WhatsApp for business (not using any 3rd party tools like Pabbly, WANotifier, etc.) to send a pdf document (Purchase Order details) to the customers without having to send a welcome text message and the customer not having to reply back with anything to receive the pdf document (Purchase Order details)?.

Note: if this is not possible then how does MakeMyTrip and book my show works where in which when we book tickets or shows we receive a pdf file (booking details) without we in person initiating the conversation of asking the booking details.

Went through the official MetaforDevelopers document https://developers.facebook.com/docs/whatsapp/cloud-api but couldn't find any solutions.

If somebody finds something out of the document link attached above related to my requirement, please let me know! Thanks in advance!