Hi.
I see that sending messages, always the response from the server is success in spite of the message doesn’t reach out the recipient. How can I know if the message was reached by the receiver number?
Participez à la discussion - ajoutez un commentaire ci-dessous:
After opening the project, run the following command in the ngrok terminal:ngrok http 3000
Then, set the returned link using the normal setWebhook service of the API and try it once again.
Thanks
Ok, I am trying to connect through ngrok to the port 3000 and I receive a refused connection. In your example code establishs a tunnel and gets a public URL. Per I see it is necessary to set the webhook. Do you know if there is other alternative to do this without using ngrok?
async function setup_network()
try{
console.log(‘ENTRA EL SETUP NETWORK’)
let public_url = await ngrok.connect(3000);
console.log(
Public Url:${public_url}
);let webhook_url =
${public_url}/webhook
;console.log(webhook_url,‘webkook_url’)
let url =
${INSTANCE_URL}/${PRODUCT_ID}/setWebhook
;let response = await rp(url, {
method: ‘POST’,
body: { webhook: webhook_url },
headers: {
‘x-maytapi-key’: API_TOKEN,
‘Content-Type’: ‘application/json’,
},
json: true,
});
console.log(
Response: ${JSON.stringify(response)}
);return response;
}
catch(e){
return Promise.resolve(e)
}}
Hello,
You could check these via your webhook when you set your webhook.
You could check documentation about how to set webhook.
Thanks