Custom config
See original GitHub issueI’m trying to create Credential with custom Configuration.
Credential oAuth2Credential =
new OfflineCredentials.Builder()
.forApi(OfflineCredentials.Api.ADWORDS)
.from(configuration)
.build()
.generateCredential();
- Cause: com.google.api.ads.common.lib.exception.ValidationException: Client ID must be set.
configuration.addProperty("refreshToken", getRefreshToken());
configuration.addProperty("clientId", getClientId());
configuration.addProperty("clientSecret", getClientSecret());
configuration.addProperty("clientCustomerId", getClientCustomerId());
configuration.addProperty("developerToken", getDeveloperToken());
configuration.addProperty("isPartialFailure", getIsPartialFailure());
- Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is com.google.api.ads.common.lib.conf.ConfigurationLoadException: Encountered a problem reading the provided configuration file “ads.properties”!] with root cause
org.apache.commons.configuration.ConfigurationException: Cannot locate configuration source ads.properties
configuration.addProperty("api.adwords.refreshToken", getRefreshToken());
configuration.addProperty("api.adwords.clientId", getClientId());
configuration.addProperty("api.adwords.clientSecret", getClientSecret());
configuration.addProperty("api.adwords.clientCustomerId", getClientCustomerId());
configuration.addProperty("api.adwords.developerToken", getDeveloperToken());
configuration.addProperty("api.adwords.isPartialFailure", getIsPartialFailure());
Thanks
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Using custom config settings in extensions — CKAN 2.9.7 ...
Extensions can define their own custom config settings that users can add to their CKAN config files to configure the behavior of the...
Read more >custom-config - Intel
custom -config. Specify the absolute path or name for a custom TOML configuration file with additional modeling parameters. GUI Equivalent.
Read more >cordova-custom-config - npm
Cordova/Phonegap plugin to update platform configuration files based on preferences and config-file data defined in config.xml.
Read more >dpa99c/cordova-custom-config - GitHub
Cordova/Phonegap plugin to update platform configuration files based on preferences and config-file data defined in config.xml - GitHub ...
Read more >AWS Config Custom Rules
AWS Config Custom Rules are rules that you create from scratch. There are two ways to create AWS Config custom rules: with Lambda...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi,
Sorry, that may be a bit confusing. The example specifically calls the
getCustomers
method ofCustomerService
since the idea is that it will show you which customers (clientCustomerIds
) your OAuth credentials can access. That is actually the only call that lets you skip theclientCustomerId
.For any other service, you will have to also set the
clientCustomerId
. I’ll make a note to add a comment to the example to clarify that point.Cheers, Josh, AdWords API Team
Hi,
You’re welcome! 😃
If that approach worked for you, could you close out the issue? If you’re still having trouble, please let me know and I’ll be happy to help.
Cheers, Josh, AdWords API Team