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 = "XXXX";
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

Reply via email to