Local API allows users to read and write configuration information, start and close the browser, search for account and so on. To know more details, please click here to get Local API documentation.
Click here to check how to troubleshoot common issues with API.
The super admins have access to API by default. If you are a team member, please make sure your manager or admin has assigned you this permission.
Go to Automation -> API to check the API connection status.
AdsPower allows to start headless mode with headless and API-key
Before starting, please make sure that the AdsPower version is v3.3.2 or above, kernel version is v2.4.2.8 or above and you have access to Local API.
Click Generate or Reset to get your API key.
1. Make sure that you have opened CMD or Terminal in your AdsPower root directory.
The root directory in Windows is usually “C:\Program Files (x86)\AdsPower”.
2. Start command
flag | required or optional | description |
---|---|---|
--headless | required | Runs browser in headless mode. |
--api-key | required | Credential to use Local API in headless mode |
--api-port | optional | Specified port for Local API |
On Windows:
"AdsPower Global.exe" --headless=true --api-key=XXXX --api-port=50325
On macOS:
"/Applications/AdsPower Global.app/Contents/MacOS/AdsPower Global" --args --headless=true --api-key=XXXX --api-port=50325
On Linux:
adspower_global --headless=true --api-key=XXX --api-port=50325
3. Now you can see return address in CLI.
❓Is it possible to start GUI mode and headless mode on a device at the same time?
No.
❓If API key is reset, will the original API still work?
No. When resetting your API key, The previous API key is invalidated. You will need to reconnect to your new API key to ensure everything is functioning as expected.
❓If API key is reset, is it possible to update it when service is running?
No. You should stop service first and use the new API key to start it again.
❓How to stop service?
By pressing Ctrl+C (under CMD) or exiting the Windows command line window.
❓What is the difference between headless mode and GUI?
1. In GUI mode you are able to log in to one account on only one device.
2. Using API-key you can log in to accounts on multiple devices at the same time. It allows you to execute automation on multiple devices for one AdsPowe account.
❓How to troubleshoot errors?
FYR here are our demos for API: https://github.com/AdsPower/localAPI
For more FAQ, please check this article on our official website.
https://www.adspower.com/blog/troubleshooting-common-issues-with-adspower-api-a-complete-guide