Re: Connecting to Adwords API in C#
Hi Nick, The AdWords API sandbox and production environment are 2 unrelated environments - developer tokens for one wouldn't work for the other. To use the sandbox, what you need to do is as follows: 1. Set your Email/Password as your gmail email / password (this is fine) 2. Set your AdWordsApi.Server endpoint to sandbox (this is fine). 3. Set your developer token to email++CUR (e.g. john@google.com++USD) 4. Comment out both ClientEmail and ClientCustomerId and call GetAllCampaigns.cs. This will initialize your sandbox. 5. Run GetAccountHierarchy.cs. This will give you the customer account ids that were created in the sandbox. 6. Pick any one account's clientCustomerId, put it in your ClientCustomerId key in app.config. 7. Run any example of your choice. When running against production, point your AdWordsApi.Server to server, developer token to the production token, and ClientCustomerId to the production client customer id. That's all. If you want to do all these things at the runtime, then you can modify the config at runtime too. Something like: (user.Config as AdWordsAppConfig).ClientCustomerId = ""; CampaignService campaignService = (CampaignService) user.GetService(AdWordsService.v201109.CampaignService); Now your service has the modified configuration. Hope this helps. Let me know if you have more questions. Cheers, Anash P. Oommen, AdWords API Advisor. -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and discussion group: http://adwordsapi.blogspot.com http://groups.google.com/group/adwords-api =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To post to this group, send email to adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/adwords-api?hl=en
Re: Connecting to Adwords API in C#
Not sure if it will works in C# library (can't check it's source code for validation), but try to setup your clientCustomerId as client_1+compancy...@gmail.com. Sandbox and your Adwords Api account are not linked with data or any relations. They both have only one same enter point - API's developer credentials (not customer). After your first login into Sandbox and performing getAllCampaigns - Google will create few accounts for you. More about that you can read on http://code.google.com/intl/en-EN/apis/adwords/docs/sandbox.html Also take a look on http://code.google.com/intl/en-EN/apis/adwords/docs/#soap I hope it will help you to understand that should be setup and what should be sent. Regards, Evgeniy. -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and discussion group: http://adwordsapi.blogspot.com http://groups.google.com/group/adwords-api =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To post to this group, send email to adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/adwords-api?hl=en
Connecting to Adwords API in C#
I've spent the last day trying to connect to the adwords api and do a simple getallcampaigns test, but have run into problems and could use some help. Here's my situation. I have a PPC account, lets call "CompanyPPC" with a client id of "111" and then I created an MCC account, "CompanyMCC" with an id of "222" so that I could get a developer token. I now have the developer token, lets call it "XYZ" but it is still pending approval. I am currently trying to do this through the Sandbox. What I am trying to do is connect to my company ppc account and view all the campaigns through the api. The error I get with my code is the following. AuthenticationError.CUSTOMER_NOT_FOUND @ ; trigger:'111' Service[CampaignService.get] Here are the values I have in my app.config https://adwords- sandbox.google.com"/> One more thing I should note is my mcc account does have linked api and user interface access to the the ppc account. Could anyone help point me in the right direction to what I'm doing wrong here. Thanks, Nick -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and discussion group: http://adwordsapi.blogspot.com http://groups.google.com/group/adwords-api =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To post to this group, send email to adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/adwords-api?hl=en