Reputation: 185
I am using Cloud API Whatsapp but not sending a message to any number, I get a 200 status when I make a request to graph.facebook.com but I am not received the message in my Whatsapp number.
This is an example configuration for Node with Axios
var axios = require('axios');
var data = '{\r\n "messaging_product": "whatsapp",\r\n "to": "00000000000",\r\n "type": "template",\r\n "template": {\r\n "name": "hello_world",\r\n "language": {\r\n "code": "en_US"\r\n }\r\n },\r\n}';
var config = {
method: 'post',
url: 'https://graph.facebook.com/v13.0/103491645721389/messages',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer token'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
I dont have problems for show bearer token and my phone because only I am testing the API.
I want to know if the reason I can't see the message on Whatsapp is that many people are using it and maybe there are problems. Or maybe I'm setting something wrong. Yesterday when I tried everything was going great, but today I only receive the status 200 but it does not show me the message. I have recreated another app in developers.facebook but nothing happens.
Some video or guide to implementing the API in Node?, because in the documentation it is in curl and I need to guide myself with Node
Upvotes: 1
Views: 4119
Reputation: 21
This happened when you use the provided test phone number (I don't know why), try a production phone number.
Upvotes: -1
Reputation: 109
Something similar happened to me, I used the example that came out after the application had just been created, it said 200 but no message arrived at the number in question, the problem was that apparently from so many shipments for another application that I had, where I also placed that same number, this It was blocked for 24 hours, in short, if you try another number that you have not used in other applications, you should receive the message without problems, it will surely help you.
Upvotes: 0
Reputation: 926
I had the same doubt because I was not able to do this neither with CURL or Python, so I made a similar post. The answer is basically that the recipient must send a message before you can use a non-template message.
Hope this helps, and check that post a for a better explanation.
Upvotes: 6