Hi Keang,
This is Carmela from the Google Ads API team as well. Thank you for reaching out. However, I need to delete your recent email in the forum as it contains your logs.
Moving forward, I can see that you have received the
NOT_ADS_USER error when you attempted to connect to the API. The NOT_ADS_USER error is encountered when the service account has not been correctly linked to the Google Ads account via the OAuth2 assertion flow. Please take note that the email address you may have used to generate the credentials should have access or be associated with Google Ads accounts.
In order to connect to Google Ads API using a Google service account, you will need a
Google Workspace domain since it is a prerequisite for using service accounts. Since you mentioned that you’re using service account credentials, could you confirm if you already followed all the mentioned
requirements:
- The service account that you created needs to be granted domain wide delegation access by a super administrator for the domain.
- Using a Google Ads user with permissions on the Google Ads account you want to access.
- Make sure that you have your own domain registered with Google Workspace.
- Service account will have the ability to impersonate any user in the domain
You may refer to this
API documentation that discusses how to access the Google Ads API with service accounts.
In addition, we strongly recommend using
OAuth2 installed app or web flows instead of service accounts unless you need domain-specific features (for example, impersonation). OAuth2 installed application and web flows require user interaction only once, when access to the account is granted. You need to implement the code set up on your end to make calls using service accounts.
Regards,
 |
| Carmela |
| Google Ads API Team |
|
|
| |

ref:_00D1U1174p._5004Q2edyiC:ref