Can't get replies from Whatsapp

Hello, I’m trying to get Botpress connected with Direct Whatsapp.

I configured the required webhook, access token, etc.

It does get my messages from Whatsapp, but it does not reply. I stripped the bot to a minimum with out success.

Can’t get any debug information from the logs, so I don’t know where to look for clues.

Hi @joseanu ,

I will have to go through the basic steps in order to make sure that we didn’t forget anything. Did you publish your bot?

Hi!
I’ve published it.

Created an app in developers.facebook, got access token, phone id, etc.

botpress is recieving messages from Whatsapp, But it’s not sending anything.

Captura de Pantalla 2023-03-27 a la(s) 11.23.56

Is it possible to send me a screen shot of your flow after removing/masking sensitive information?

This is it

Hi @joseanu

I suggest that one of our Solutions Engineers jumps on a quick Zoom call with you to look at your bot and help.

I’ll email you the calendar link to book a quick call.

Cheers :raised_hands:

1 Like

Hello,

I’m experiencing a similar issue.
What was the solution to the problem?
Messages I send to the bot are received and processed properly. I don’t get any message back on the WhatsApp conversation, though, despite the logs showing the message was supposedly sent.

Thanks,
Francesco

[Workflow] Starting from Main flow
[68a452a1-bf6b-4f6e-b5e3-c44a51b98916] Transition from (flow:Main) [node:Start] to [node:Greeting]
[68a452a1-bf6b-4f6e-b5e3-c44a51b98916] Sending Message. Type: text. Text: Hello!
[68a452a1-bf6b-4f6e-b5e3-c44a51b98916] Transition from (flow:Main) [node:Greeting] to [node:End]
[68a452a1-bf6b-4f6e-b5e3-c44a51b98916] Executing "Conversation End" workflow
[68a452a1-bf6b-4f6e-b5e3-c44a51b98916] Transition from (flow:Conversation End) [node:Entry] to [node:Standard]
[68a452a1-bf6b-4f6e-b5e3-c44a51b98916] Transition from (flow:Conversation End) [node:Standard] to [node:End]
[68a452a1-bf6b-4f6e-b5e3-c44a51b98916] End of workflow

Hi @francesco ,

To help me troubleshoot the issue, I have got some questions:

  • Are you sure your token is updated?
  • Did you publish your bot?
  • Did you add a credit card to your WhatsApp account?

Yes is the answer to all those questions. I’m able to send messages by calling the graph API directly. Did you look at the logs?
Why would the logs say “Sending message” if the bot wasn’t published?

It would help if I could see in the logs the response from the WhatsApp API backend.
Or if you could provide that

Hi @francesco
Are those logs from the Studio logs or the logs of the channel?

This logs is what I am interested in:

I only see one place with logs.

Please refer to the screenshot. It is not in the channel section nor in the studio.

Yes, those are the logs I’ve sent you from day 1.
And I can send a message using curl and the same access token configured on Botpress just fine:

curl --request POST -H 'Content-Type: application/json' --url https://graph.facebook.com/v16.0/***********/messages?access_token=****************************************** --data '{"messaging_product":"whatsapp","to":"***********","type":"text","text":{"body":"test"}}' -v
Note: Unnecessary use of -X or --request, POST is already inferred.
*   Trying 2a03:2880:f091:19:face:b00c:0:2:443...
* TCP_NODELAY set
* Connected to graph.facebook.com (2a03:2880:f091:19:face:b00c:0:2) port 443 (#0)
* ALPN, offering http/1.1
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
*   CAfile: /etc/pki/tls/certs/ca-bundle.crt
  CApath: none
* TLSv1.2 (OUT), TLS header, Certificate Status (22):
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS change cipher, Change cipher spec (1):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-ECDSA-AES128-GCM-SHA256
* ALPN, server accepted to use http/1.1
* Server certificate:
*  subject: C=US; ST=California; L=Menlo Park; O=Meta Platforms, Inc.; CN=*.facebook.com
*  start date: Feb  2 00:00:00 2023 GMT
*  expire date: May  3 23:59:59 2023 GMT
*  subjectAltName: host "graph.facebook.com" matched cert's "*.facebook.com"
*  issuer: C=US; O=DigiCert Inc; OU=www.digicert.com; CN=DigiCert SHA2 High Assurance Server CA
*  SSL certificate verify ok.
> POST /v16.0/***********/messages?access_token=******************************************* HTTP/1.1
> Host: graph.facebook.com
> User-Agent: curl/7.65.0
> Accept: */*
> Content-Type: application/json
> Content-Length: 90
>
* upload completely sent off: 90 out of 90 bytes
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Content-Type: application/json; charset=UTF-8
< Vary: Origin
< x-business-use-case-usage: {"***********":[{"type":"whatsapp","call_count":1,"total_cputime":1,"total_time":1,"estimated_time_to_regain_access":0}]}
< x-fb-rlafr: 0
< Access-Control-Allow-Origin: *
< facebook-api-version: v16.0
< Strict-Transport-Security: max-age=15552000; preload
< Pragma: no-cache
< Cache-Control: private, no-cache, no-store, must-revalidate
< Expires: Sat, 01 Jan 2000 00:00:00 GMT
< x-fb-request-id: AR7sgB9K9p2ExNx-jkpG3Zy
< x-fb-trace-id: HhJfpbX8vd4
< x-fb-rev: 1007375234
< X-FB-Debug: kwvhFXZfTkmLSpRvR2mQNZ922PzvPFIU10HYBk2RR2zoPlCB/GxjhDjDf3OY23wDP9FSxjMJk0DgMcHiCiGQqQ==
< Date: Tue, 25 Apr 2023 18:47:06 GMT
< Alt-Svc: h3=":443"; ma=86400
< Connection: keep-alive
< Content-Length: 179
<
* Connection #0 to host graph.facebook.com left intact
{"messaging_product":"whatsapp","contacts":[{"input":"***********","wa_id":"***********"}],"messages":[{"id":"wamid.HBgMNTU3Mzk4MzE0NzU5FQIAERgSQ0I4RDIwMkZDQTdDNTYzREJEAA=="}]}     ✔


Hi!

Is there any news?

We’re investigating the issue and will get back to you tomorrow with some troubleshooting steps :slight_smile:

We’ll send you a calendar link to book some time with one of our Solutions Engineers to help out. Please be on the lookout for a Botpress email!

I have the same issue and i don’t know what’s wrong, my chatbot is receiveng the message from whatsapp, but it doesn’t appear in my whatsapp chat