WhatsApp Cloud API
Создание приложения
Установка вебхука и subscribe на все события
- Войдите в созданное приложение и добавьте WhatsApp, нажав кнопку «Настроить».
- На панели слева выберите «WhatsApp» — «Быстрый старт»:
Работа в тестовом режиме
- Перейти на Getting started
- Скопировать оттуда WhatsApp Business Account ID: 115468054796966 и временный токен
Работа в боевом режиме
- Перейти на Getting started скопировать оттуда WhatsApp Business Account ID: 115468054796966
- Если номера еще не добавлены - добавить их по кнопке Add phone number внутри страницы
Создать System user
https://developers.facebook.com/blog/post/2022/12/05/auth-tokens/
Fortunately, the Meta for Developers platform makes this easy. All you need to do is add a System User to your business account to obtain an access token you can use to continue accessing the API. To create a system user, do the following:
Go to Business Settings.
Select the business account your app is associated with. Below Users, click System Users. Click Add. Name the system user, choose Admin as the user role, and click Create System User. Click Add Assets Add Full Control to App Click Generate New Token. Select your App Select the whatsapp_business_messaging AND whatsapp_business_management permissions. Copy and save your token.
Дать ему права к номеру
Go to Business Settings.
Select the business account your app is associated with. Below Accounts, click WhatsApp Accounts. Select WABA Account Click Add people on People tab Select created System User, select Full control and click Assign