I am trying to configure a number in the WhatsApp API following the steps outlined in the documentation. So far, I have completed the following steps:
Generated a temporary access token.
-- Configured and verified the associated phone number.
-- However, when attempting to send messages with the API in the second step ("Send messages with the API"), I am encountering the following error:
Sending of message failed.
Unsupported post request. Object with ID 'XXX' 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
Actions taken:
I used the temporary access token to attempt to send messages, but encountered the error. -- When using a permanent token, I am able to send messages via Postman without any issues, but the response is not received on the webhook. -- I configured the webhook with a test number, and in this case, I am receiving the messages correctly. This leads me to rule out the webhook configuration as the cause of the issue.
Issues identified:
The error seems to be related to permissions or the existence of the object (ID: 'XXX'), which only occurs when using the temporary token. -- Although sending messages works with the permanent token, the webhook does not receive responses, which limits the full functionality of the system.
Questions: -- Could it be that the temporary token has limited permissions that prevent message sending? -- Why, when using the permanent token, are messages not being received by the webhook, even though the webhook configuration seems correct with the test number?
Is the error happening when you use a test number from Meta? If you get the error with a production number, try using a permanent token.