Closed AlejandroT02 closed 2 years ago
@AlejandroT02
You need to perform the following steps:
If you are using asp.net core 6.
You will need to add the following key and value the appsetting.json file. This will solve this issue builder.Configuration.GetSection("WhatsAppBusinessCloudApiConfiguration") it is reading the configuration from appsetting.json file
{
"WhatsAppBusinessCloudApiConfiguration": {
"WhatsAppBusinessPhoneNumberId": "<YOUR PHONE NUMBER ID FROM META>",
"WhatsAppBusinessAccountId": "<YOUR BUSINESS ACCOUNT ID FROM META>",
"WhatsAppBusinessId": "",
"AccessToken": "<YOUR TEMPORARY OR PERMANENT ACCESS TOKEN FROM META>"
}
}
Let me know if that solved your issue
Thank you, but it is giving me another problem, I am entering the data correctly and it does not send me the whatsapp or give me any exception
@AlejandroT02 If you have received a test hello world message from meta when sending it to test your phone number. You are required to reply with any text since it's a template message. After you reply to the Facebook hello world template message with any text to it. You can now send any type of message to your test phone number since it is like a form verification on their end. That will solve your issue of not receiving WhatsApp messages from cloud api.
Thanks!!!! didn't know i had to reply, you helped me a lot.
Hello, im trying to send a text message and it throws me this exception: WhatsappBusiness.CloudApi.Exceptions.WhatsappBusinessCloudAPIException: 'Unsupported post request. Object with ID 'messages' does not exist, cannot be loaded due to missing permissions, or does not support this operation. i saw that builder.Configuration.GetSection("WhatsAppBusinessCloudApiConfiguration") is not working. i would appreciate if you can provide an example connecting whatsapp business configurations such as phonenumberid with the project