Initialize AdManagerClient from a configuration file
mainThe library uses a googleads.yaml file to store credentials and settings. You can copy this file to your home directory for default loading, or provide a specific path to the LoadFromStorage method.
- Copy
googleads.yamlto your home directory. - Use
AdManagerClient.LoadFromStorage()to initialize the client.
# Use the default location - your home directory:
ad_manager_client = ad_manager.AdManagerClient.LoadFromStorage()
# Alternatively, pass in the location of the file:
ad_manager_client = ad_manager.AdManagerClient.LoadFromStorage('C:\My\Directory\googleads.yaml')