Hello John,
Once you made a getCampaigns request, your sandbox account is initialized. The next step is to get the list of accounts (see example<http://code.google.com/p/google-api-ads-ruby/source/browse/adwords_api/examples/v201109_1/account_management/get_account_hierarchy.rb>) and choose a sub-account to use. As by default you are 'hitting' an MCC account which can have no campaigns, you will always get an empty response. Use the client_customer_id key to specify an account under the mcc. Also, I've recently published a rails-based demo application you may find useful, see source<http://code.google.com/p/google-api-ads-ruby/source/browse/adwords_api/examples/v201109_1/account_management/get_account_hierarchy.rb> . -Danial, AdWords API Team. On Saturday, June 16, 2012 12:39:05 AM UTC+4, John Quarto-vonTivadar wrote: > > I had the same challenge as mwunit11: the response I got back from the > sandbox was: > > {"total_num_entries":0,"page_type":"CampaignPage","total_budget":{"period":"DAILY","amount":{"comparable_value_type":"Money","micro_amount":0}}} > > > (parsed it as JSON ... I use Rails so this seemed more natural) > > > so clearly the call is working since I'm getting something back. But it's > not what I expected from the Sandbox. Also **why** is the documentation so > unfriendly in explaining what to do next? It's written from the perspective > of someone who already knows how to work with the API, not from the > perspective of someone trying to learn the API. > > > Anyway, my short code (based completely on Examples found online): > > > def example1 > adwords = setup_adwords > #adwords = AdwordsApi::Api.new > campaign_srv = adwords.service(:CampaignService, :v201109_1) > > # Get 'Id', 'Name' and 'Status' fields of all campaigns. > campaigns = campaign_srv.get({:fields => ['Id', 'Name', 'Status']}) > > respond_with campaigns.to_json > end > > and > > def setup_adwords > adwords = AdwordsApi::Api.new({ > :authentication => { > :method => 'ClientLogin', > :developer_token => 'MY_EMAIL_HERE++USD', > :user_agent => 'Ruby Sample', > :password => 'MY_PASSWORD_HERE', > :email => 'MY_EMAIL_HERE' > }, > :service => { > :environment => 'SANDBOX' > } > }); > end > > On Wednesday, June 6, 2012 5:42:10 AM UTC-5, Danial Klimkin wrote: >> >> Hello mwunit11, >> >> >> Please send me the full XML responses for getCampaign and >> getAccountHierarchy over email. Also, please attach auth.ini (make sure to >> remove password). >> >> >> -Danial, AdWords API Team. >> >> >> On Tuesday, June 5, 2012 6:43:28 PM UTC+4, mwunit11 wrote: >>> >>> Hi Danial, >>> >>> I created a new Google account, and followed the same steps: set the >>> values in auth.ini, ran the getCampaigns example script, and then the >>> getAccountHeirarchy example script with the exact same results. No accounts >>> were generated. >>> >>> How can we debug this further? I have been trying to get a working >>> sandbox account for over a week already, to no avail. >>> >>> Thanks >>> >>> On Monday, June 4, 2012 3:05:55 PM UTC+3, Danial Klimkin wrote: >>>> >>>> Hello mwunit11, >>>> >>>> >>>> The very first request to the sandbox needs to be getCampaigns in order >>>> for it to initialize properly. >>>> >>>> In case it was the first one but you still see no accounts created, >>>> please try initializing a new sandbox with another Google account. >>>> >>>> >>>> -Danial, AdWords API Team. >>>> >>>> >>>> On Thursday, May 31, 2012 7:33:07 PM UTC+4, mwunit11 wrote: >>>>> >>>>> Hello, >>>>> >>>>> I downloaded the API library for PHP, edited the settings.ini to read: >>>>> >>>>> DEFAULT_SERVER = "https://adwords-sandbox.google.com" >>>>> >>>>> and edited the auth.ini to read: >>>>> >>>>> email = "******@gmail.com" >>>>> password = "*********" >>>>> userAgent = "MWWP" >>>>> developerToken = "****@gmail.com++USD" >>>>> >>>>> I ran /examples/v201109_1/BasicOperations/GetCampaigns.php which >>>>> produced: >>>>> >>>>> "No campaigns were found." >>>>> >>>>> I then >>>>> ran /examples/v201109_1/AccountManagement/GetAccountHierarchy.php which >>>>> produced: >>>>> >>>>> (Customer Id, Account Name/Login, Link Status) 0, ********@gmail.com, >>>>> N/A >>>>> >>>>> Am I doing something wrong? How come 5 test accounts are not being >>>>> generated? Do I need to be using an MCC google account? >>>>> >>>>> thanks! >>>>> >>>> -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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