Comments (22)
Hi @Mattia921
Can you run this and let me know if you're able to receive a message?
>>> messenger.send_template("hello_world", "255757xxxxxx", components={})
from heyoo.
Hi @Kalebu, thanks for your response. The fact is that I do not receive any errors while executing the python code.
This is the output:
2022-11-09 10:49:39,296 - root - INFO - Sending message to 39333***
2022-11-09 10:49:40,604 - root - INFO - Message sent to 39333***
So the code is executed without errors, but I don't actually receive anything on the whatsapp number.
I've already added the receiver into the recipient list inside the Facebook developer portal.
Can be this problem related to the country prefix number? In my case, I've entered the Italian code without the + (so only 39).
I hope I was clear.
Thanks again for your time. Have a nice day
from heyoo.
Hi @Mattia921
Can you run this and let me know if you're able to receive a message?>>> messenger.send_template("hello_world", "255757xxxxxx", components={})this way works for me, any other method doesn't give any error but doesn't send anything either.
Did you add your number as one of the test numbers to the Facebook developer portal?
You could also try replying first to the number before sending any other message other than the template message
from heyoo.
Hi @emre84 Can you please share the response message in English ?
from heyoo.
Hi Kalebu,
thanks for the response. This is unfortunately what i get as response(nothingelse as imentiined above)
Output:
2022-11-03 22:51:34,464 - root - INFO - Sending message to 49xxx
2022-11-03 22:51:35,200 - root - INFO - Message sent to 49xxx
from heyoo.
Hi Kalebu,
thanks for the response. This is unfortunately what i get as response(nothingelse as imentiined above)
Output: 2022-11-03 22:51:34,464 - root - INFO - Sending message to 49xxx 2022-11-03 22:51:35,200 - root - INFO - Message sent to 49xxx
I have exactly the same problem. Thanks in advance for your time
from heyoo.
Hi @emre84 and @Mattia921 just know you cannot send other messages other than <template_message> to un whitelisted numbers, To able to do this you need to add the number to the recipient list in your Facebook developer portal.
The error translates to
{'error': {'message': '(#131030) Recipient phone number not in allowed list', 'type': 'OAuthException', 'code': 131030, 'error_data': {'messaging_product': 'whatsapp' , 'details': 'Recipient's phone number is not whitelisted: add the recipient's phone number to a recipient list, then try again.'}, 'error_subcode': 2655007, 'fbtrace_id': 'Akf6LRk1j9htPAuzA5P971E'}}
They Allow up to 5 test numbers which you cannot change
Please let me know if you're still having issues
from heyoo.
Hi @emre84 and @Mattia921 just know you cannot send other messages other than <template_message> to un whitelisted numbers, To able to do this you need to add the number to the recipient list in your Facebook developer portal.
The error translates to
{'error': {'message': '(#131030) Recipient phone number not in allowed list', 'type': 'OAuthException', 'code': 131030, 'error_data': {'messaging_product': 'whatsapp' , 'details': 'Recipient's phone number is not whitelisted: add the recipient's phone number to a recipient list, then try again.'}, 'error_subcode': 2655007, 'fbtrace_id': 'Akf6LRk1j9htPAuzA5P971E'}}They Allow up to 5 test numbers which you cannot change
Please let me know if you're still having issues
I added also in the recipient list in your Facebook developer portal.
Note:I am sure that my token number, phone_number_id and recipient_id number are correct, with the reason that if I write anything wrong in these fields, I get following error message.:
2022-11-03 23:03:01,945 - root - INFO - Status code: 400
2022-11-03 23:03:01,945 - root - INFO - Response: {'error': {'message': '(#131030) Recipient phone number not in allowed list', 'type': 'OAuthException', 'code': 131030, 'error_data': {'messaging_product': 'whatsapp', 'details': 'Empfänger-Telefonnummer steht nicht auf Positivliste: Füge die Telefonnummer des Empfängers zu einer Empfängerliste hinzu und versuche es dann noch einmal.'}, 'error_subcode': 2655007, 'fbtrace_id': 'Akf6LRk1j9htPAuzA5P971E'}}
from heyoo.
Hi @Mattia921
Can you run this and let me know if you're able to receive a message?
>>> messenger.send_template("hello_world", "255757xxxxxx", components={})
Hi @Kalebu, in this case I'am able to receive the message. So since I would like to use the library to upload and then download images, should I always use the send_template method?
Thanks again for your help
from heyoo.
Hi Kalebu,
This is my output. messenger.send_template("hello_world", "49xxx", components={}) 2022-11-09 15:37:06,533 - root - INFO - Sending template to 49xxx 2022-11-09 15:37:07,003 - root - INFO - Template not sent to 49xxx 2022-11-09 15:37:07,003 - root - INFO - Status code: 401 2022-11-09 15:37:07,003 - root - INFO - Response: {'error': {'message': 'Error validating access token: Session has expired on Friday, 04-Nov-22 14:00:00 PDT. The current time is Wednesday, 09-Nov-22 06:37:06 PST.', 'type': 'OAuthException', 'code': 190, 'error_subcode': 463, 'fbtrace_id': 'A4QGvLtyY9xP-QVKPYRWMjX'}}
Note:I tried also +49xxx, 0049xxx, but none of them worked.
Since the access token updates every 24 hours, did you use the new one?
from heyoo.
I had many similar problems in the beginning and It just got solved with a new Facebook Business Profile.
As far as I see this is not a issue with the heyoo library. Does it work to send the same messege in e.g. Postman?
from heyoo.
I had many similar problems in the beginning and It just got solved with a new Facebook Business Profile. As far as I see this is not a issue with the heyoo library. Does it work to send the same messege in e.g. Postman?
Hi @soerenetler, I've just tried with postman and I obtain the same result.
If I use the "type"="template" everything works fine, as with the wrapper of the heyoo library. On the other hand, with the "type"="text" (equivalent to the heyoo method send_message), the API call works but I don't receive anything on the WhatsApp number.
I will try with a new Facebook Business profile as you suggest. Thanks
from heyoo.
I had many similar problems in the beginning and It just got solved with a new Facebook Business Profile. As far as I see this is not a issue with the heyoo library. Does it work to send the same messege in e.g. Postman?
Hi @soerenetler, I've just tried with postman and I obtain the same result. If I use the "type"="template" everything works fine, as with the wrapper of the heyoo library. On the other hand, with the "type"="text" (equivalent to the heyoo method send_message), the API call works but I don't receive anything on the WhatsApp number.
I will try with a new Facebook Business profile as you suggest. Thanks
I've tried with a new Business profile but I could not solve the problem
from heyoo.
I'm currently having the exact same problem, I've done all steps and still no message
from heyoo.
Currently, customers in Turkey cannot receive messages sent by businesses using Cloud API. However, businesses in Turkey are still able to send messages using the Cloud API.
from heyoo.
Hi @Mattia921
Can you run this and let me know if you're able to receive a message?
>>> messenger.send_template("hello_world", "255757xxxxxx", components={})
this way works for me, any other method doesn't give any error but doesn't send anything either.
from heyoo.
Hi,
Thanks for the response. Following code works fine for me either:
messenger.send_template("hello_world", "255757xxxxxx", components={})
But I can just send template messages with this command.
isn't it possible to use messenger.send_message? I do not want to use any templates.
from heyoo.
Hi @Mattia921
Can you run this and let me know if you're able to receive a message?>>> messenger.send_template("hello_world", "255757xxxxxx", components={})this way works for me, any other method doesn't give any error but doesn't send anything either.
Did you add your number as one of the test numbers to the Facebook developer portal?
You could also try replying first to the number before sending any other message other than the template message
Replying first to the number solve the problem. Thanks.
from heyoo.
Is anyone still having this issue?
Here are the common causes:
- You're sending a media that includes a broken link.
- Your message content has broken a Whatsapp messaging rule. For example:
- Having a button with text that is more than 20 characters will result in a success response, but the message will not be sent to the user.
- Having interactive message that includes more than the specified 3 buttons or more than the specified 10 list items will result in the same thing.
- Having a footer with text that is more than 20 characters will result in same.
- You are trying to send a non-template message to a user who hasn't messaged your bot within the last 24 hours.(This should actually throw an error)
from heyoo.
I had this problem the very first time I set up the Facebook Dev Portal, fixed it by sending an SMS to the test number.
from heyoo.
Okkk so I got this issue again, this was the fix
from heyoo.
Just send a template message and you are done!
from heyoo.
Related Issues (20)
- importing Heyoo is messing logging configuration HOT 5
- Can messages send to groups? HOT 4
- TypeError: unsupported operand type(s) for |: 'type' and 'NoneType' HOT 3
- Import error HOT 2
- Key error in changed_field for webhook HOT 3
- Looping old messages ( I am Building a chatbot for Whatsapp) HOT 2
- Typo in the docs HOT 3
- Make it just like discord.py HOT 3
- seems like incorrect method HOT 2
- Messange order HOT 6
- get_message for messages of type interactive or list_reply HOT 6
- send template message in different translations (spanish) HOT 3
- Only one method for sending templates HOT 4
- Elevate Error of API HOT 5
- Release to PyPI HOT 3
- INFO - Message sent to number but it no longer arrives to WA HOT 4
- Receiving multiple webhook new message data for single question HOT 3
- recipient phone number not in allowed list HOT 2
- where can I get the token? (i have 3 different ones) HOT 2
- Video not received HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from heyoo.