There are two main ways to get an API token from a Facebook Ads account. The first is simple, the second is complicated.
EAAB and EAAI token
Most often EAAB token is used for working with Facebook, but sometimes there are specific tasks for which it is necessary to use EAAI. There is also an EAAC token, but it is not widely used
Differences between EAAB and EAAI
Differences between tokens: EAAI has wider API access.
Remind! The token works once you receive it until you hit the “Logout” button on Facebook, then it will refresh.
Getting EAAB token
You can easily get the EAAB, through the code of the Ads Manager page. Open your Ads Manager: https://www.facebook.com/adsmanager/manage/, right-click, select “View Code”:
Search the code for the phrase new variant: accessToken="
, old variant that doesn’t work access_token="
(Facebook updated the writing of the variable in June 2020) and find the token:
If you view the source code via Google Chrome and it does not display the whole code and does not find the token, replace “true” with “1” in the address bar at the end:
Getting the EAAI token
Facebook EAAI token can be obtained from this page https://www.facebook.com/ads/manager/account_settings/account_billing/, follow the link, select “view page code”, search for “access_token:” without quotes, and get the token.
Getting EAAG Business Manager token
- Go to Business Manager
For example, follow the link https://business.facebook.com/settings/people/
- Open the page code view
- Search the page (Ctrl+F) for “EAAG”.
-
Copy from the beginning to the end of the quotes. The token is yours.
Getting EAAC token via Facebook app creation
Actually, this token can be EAAH, EAAL, EAAV, etc.
Open the developer site – developers.facebook.com/apps. Sign up.
Create an application
Choose the type “Other”
Specify any name. Add a working email. If desired, we can specify BM.
Select API Marketing:
Next “Tools”
Check the rights we need and click “Get token”.
In the field below get the token: