Posts tagged with mern

I'm working on sending WhatsApp messages through the Meta (Facebook) Graph API using the following endpoint:

https://graph.facebook.com/v21.0/${{phoneNumber-id}}/messages 

Here is the body

{   "messaging_product": "whatsapp",   "to": "",   "type": "template",   "template": {     "name": "hello_world",     "language": {       "code": "en_US"     }   } } 

However, when I hit the API, I receive the following error response:

{     "error": {         "message": "Unsupported post request. Object with ID '${{phoneNumber-id}}' does not exist, cannot be loaded due to missing permissions, or does not support this operation. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api",         "type": "GraphMethodException",         "code": 100,         "error_subcode": 33,         "fbtrace_id": "Ap51V1Qjcw1Vh8LJ4aeP0Fm"     } } 

I am using test number provieded by facebook to send messages, I’ve verified my access token and permissions but still encounter this error.

What could be causing this issue? Are there any specific permissions or configurations I might be missing, or is there something wrong with how I’m referencing ${{phoneNumber-id}} in the endpoint? Any help or insights with the WhatsApp API would be greatly appreciated.