When using the WhatsApp Business API, error code 131005 with the message "Access Denied" means your app does not have the necessary permissions to perform the requested action. This guide explains what causes the error and how to fix it.
When Does Error 131005 Occur?
This error occurs when:
Permissions Are Missing: Your access token doesn’t include the required permissions (whatsapp_business_management and whatsapp_business_messaging).
Permissions Were Revoked: Permissions previously granted to your app have been removed.
How to Fix Error 131005
1. Debug Your Access Token
Visit the Access Token Debugger tool:
https://developers.facebook.com/tools/debug/accesstoken/Paste your current access token into the debugger.
Check if your token includes the following permissions:
whatsapp_business_management
whatsapp_business_messaging
If these permissions are missing, proceed to generate a new access token.
2. Generate a New Access Token
Log in to the Meta App Dashboard connected to your WhatsApp Business API account.
Select the app you are using for API calls.
Generate a new token and ensure you select:
whatsapp_business_management
whatsapp_business_messaging
By following these steps, you can quickly resolve this error and continue using the WhatsApp Business API without interruptions. For more troubleshooting tips check out heltar.com/blogs.