Comments (20)
Did you include the prefix in the phone number?
Like if it's +39 the number should be "39xxxxx"
from heyoo.
@filipporomani Thanks for the quick response. Yes I did. 972 is the prefix
from heyoo.
Try to also add preview_url=False
in the send_message arguments
from heyoo.
and also try to do this:
token = 'EAAC14******'
messenger = WhatsApp(token,phone_number_id='12598*******')
msg = messenger.send_message('Hello I am WhatsApp Cloud API', '972*******')
print(msg)
from heyoo.
msg = messenger.send_message('Hello I am WhatsApp Cloud API', '972*******') print(msg)
Same result
from heyoo.
so that you can see the full response output and get the error code. If you want to send the output it gives i may help you further.
from heyoo.
print(msg)
This is the output:
{'messaging_product': 'whatsapp', 'contacts': [{'input': '972*****', 'wa_id': '972*****'}], 'messages': [{'id': 'wamid.HBgMOTcyNTIzMjY4ODg4FQIAERgSMjhDNkE4RTBCNTJDMjUwRDYwAA=='}]}
from heyoo.
same error for me. that's strange. lemme check with the api docs.
from heyoo.
same error for me. that's strange. lemme check with the api docs.
That's good news for me :-)
from heyoo.
have you got the payment method setted up on the facebook dev portal?
from heyoo.
Not yet. Is it a must while using only their test number?
from heyoo.
Please note that from the API setup page the "send message" button works well
So I am not sure it is a payment issue
from heyoo.
it's not then
from heyoo.
try to send a message to the test number from your phone
and then try to send again via your code
from heyoo.
WOW!! That did the job!!! THANKS.
Can you explain why?
from heyoo.
Facebook doesn't let you send custom messages to users if they don't start a conversation with you in the past 24 hours. If they don't start a conversation you can only send template messages to them (which is what you did with the send message button to test it).
from heyoo.
That is great. BUT does it mean that this will happen also on my regular usage of this service?
Is there a way to avoid the 24hours issue?
from heyoo.
Sadly there is not. Btw you can edit the templates as you like, create new ones (you can also add variables to them) and send them directly.
from heyoo.
Ok. I will investigate this. Many thanks for your quick help!!
from heyoo.
Happy to help! :-)
from heyoo.
Related Issues (20)
- 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
- Function download_media: audio name format error HOT 1
- Can heyoo retrieve whatsApp number history data HOT 1
- New Release to Pypi HOT 1
- ImportError: cannot import name 'url_quote' from 'werkzeug.urls' HOT 1
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.