Error in GetRefreshToken.php when Migrating to OAuth2 video is followed
hi there. :) I am Pierre du Toit, a PHP and MySQL developer for performatix.co developerToken has been inserted into auth.ini since google validated our request for API Access. userAgent inserted as performatix.co:Daily Campaign Cost Calculations:V1.0 the clientCustomerId is the single one that belongs to the MCC. this has to get costs from accross multiple campaigns. however - i am struggling to follow the video https://www.youtube.com/watch?v=KetKPhxY4Js#t=320 - as i am getting the following error when running php GetRefreshToken.php from the directory in which it is located, using the Putty linux console. i keep getting the following error (directories have been updated so as not to disclose sensitive information such as directory structures and locations on our server). PHP Catchable fatal error: Argument 1 passed to OAuth2Handler::GetAuthorizationUrl() must be an array, null given, called in /google_adwords/examples/AdWords/Auth/GetRefreshToken.php on line 48 and defined in /google_adwords/src/Google/Api/Ads/Common/Util/OAuth2Handler.php on line 71 i am new to the google adwords api - and we have received our confirmation etc from google. rather than learning adwords api with clientlogin then moving over to oauth 2, i am starting with oauth 2. however am having difficulties following the only tutorial video i could get my hands on... what is being done? are there maybe any starter video's for getting adwords with oauth 2 done from scratch - instead of following on from an outdated method? sincerely, Pierre du Toit. -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and discussion group: http://googleadsdeveloper.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 --- You received this message because you are subscribed to the Google Groups AdWords API Forum group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Video Ads - How to pull metrics from Adwords API.
Hi Adwords Team, It is 2014 and was wondering if these metrics are available yet via the API? Many thanks, Paul -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and discussion group: http://googleadsdeveloper.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 --- You received this message because you are subscribed to the Google Groups AdWords API Forum group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: AdExtensions total values
Hi Joni, Can you provide us with the report definition? As this will help us explain what you're seeing. For instance, you may be using segmentation fields which means you'd get more than one result per feed item. For further information on this, please see the Placeholder Feed Item Report descriptionhttps://developers.google.com/adwords/api/docs/appendix/reports#placeholder-feed-item . Regards, - Paul, AdWords API Team. On Wednesday, 25 December 2013 21:25:00 UTC, Joni Salmi wrote: Hi, I'm having problems gettings stats for Ad Extensions. I've attached a picture in which I can't seem to understand how the total values are calculated. Most fields in picture are still in finnish, but I translated the relevant ones. The table on top of the picture is data from Placeholder Feed Item Report it seems correct but my client only wants the total values which I don't know how are calculated, how if I should use different Report Type. - Joni -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and discussion group: http://googleadsdeveloper.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 --- You received this message because you are subscribed to the Google Groups AdWords API Forum group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Downloading reporting data for an specific date PHP v201309
Duplicate of: https://groups.google.com/forum/?fromgroups=#!topic/adwords-api/G-vxzOXTeaw Please see my answer there regarding your question. On Monday, December 30, 2013 1:44:49 PM UTC+1, MWA wrote: For example if I am using CampaignService: $campaignService = $user-GetService('CampaignService', ADWORDS_VERSION); On Monday, December 30, 2013 5:14:49 PM UTC+5, MWA wrote: Hi There Any one has idea about getting Converions,Impressions,Clicks etc data for a given date using PHP API v201309? -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and discussion group: http://googleadsdeveloper.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 --- You received this message because you are subscribed to the Google Groups AdWords API Forum group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Problem with fetching data for a particular date (Cron job PHP v201309)
Hi MWA, As of v201309, statistics can no longer be retrieved through the Campaign Service, you should use an adhoc report (Reporting Service) to obtain them. https://developers.google.com/adwords/api/docs/guides/migration/v201309 On Monday, December 30, 2013 12:56:22 PM UTC+1, MWA wrote: I am using this to Get campaign stats like Clicks, Conversions, Impressions etc $campaignService = $user-GetService('CampaignService', ADWORDS_VERSION); On Thursday, December 26, 2013 1:26:52 PM UTC+5, Danial Klimkin wrote: Hello MWA, What is the report type you are running? -Danial, AdWords API Team. On Tuesday, December 24, 2013 9:42:51 PM UTC+4, MWA wrote: Hi There, I have been using v201306 recently, but now when i am going to migrate to version v201309, one of the cron jobs that makes use of conversions data (for a particular date) is returning error: if i change my version to v201309 define('ADWORDS_VERSION', 'v201309'); it gives the following error in selector fields *SoapFault Object ( [message:protected] = [SelectorError.INVALID_FIELD_NAME @ serviceSelector; trigger:'Clicks', SelectorError.INVALID_FIELD_NAME @ serviceSelector; trigger:'Impressions', SelectorError.INVALID_FIELD_NAME @ serviceSelector; trigger:'Cost', SelectorError.INVALID_FIELD_NAME @ serviceSelector; trigger:'AveragePosition', SelectorError.INVALID_FIELD_NAME @ serviceSelector; trigger:'AverageCpc', SelectorError.INVALID_FIELD_NAME @ serviceSelector; trigger:'AverageCpm', SelectorError.INVALID_FIELD_NAME @ serviceSelector; trigger:'Ctr', SelectorError.INVALID_FIELD_NAME @ serviceSelector; trigger:'Conversions'] == * * Following are my selector feilds:* $selector-fields = array('Id','KeywordText', 'KeywordMatchType','PlacementUrl','Status','SystemServingStatus','ApprovalStatus','DestinationUrl','FirstPageCpc','IsKeywordAdRelevanceAcceptable','IsLandingPageLatencyAcceptable','IsLandingPageQualityAcceptable','QualityScore','CpcBidSource','CpmBidSource','Clicks','Impressions','Cost','AveragePosition','AverageCpc','AverageCpm','Ctr','Conversions','EnhancedCpcEnabled','CpcBid','CpmBid'); With v201306 it runs fine, What should I do now? -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and discussion group: http://googleadsdeveloper.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 --- You received this message because you are subscribed to the Google Groups AdWords API Forum group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: error when calling v201306.AddCampaigns
Hi, Could you provide some more details, such as the customer ID of the account you are using for this request? You can send this information *only to me* by clicking *Reply to author*. Thanks, Josh, AdWords API Team On Monday, December 30, 2013 1:43:22 AM UTC-5, kano patel wrote: This code example adds campaigns. To get campaigns, run GetCampaigns.cs. An exception occurred while running this code example. System.Reflection.TargetI nvocationException (Exception has been thrown by the target of an invocation.) at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] argum ents, SignatureStruct sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] argume nts, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwn er) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invoke Attr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisib ilityChecks) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invoke Attr, Binder binder, Object[] parameters, CultureInfo culture) at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) at Google.Api.Ads.AdWords.Examples.CSharp.Program.InvokeRun(Object codeExampl e, AdWordsUser user) in c:\Users\admin\Downloads\awapi_dotnet_lib_v16.4.0\exampl es\CSharp\Program.cs:line 140 at Google.Api.Ads.AdWords.Examples.CSharp.Program.RunACodeExample(AdWordsUser user, Object codeExample) in c:\Users\admin\Downloads\awapi_dotnet_lib_v16.4.0\ examples\CSharp\Program.cs:line 99 Caused by System.ApplicationException (Failed to add shared budget.) at Google.Api.Ads.AdWords.Examples.CSharp.v201306.AddCampaigns.Run(AdWordsUse r user) in c:\Users\admin\Downloads\awapi_dotnet_lib_v16.4.0\examples\CSharp\v20 1306\BasicOperations\AddCampaigns.cs:line 89 Caused by Google.Api.Ads.AdWords.Lib.AdWordsApiException (An API exception has occurred. S ee ApiException and InnerException fields for more details.) at Google.Api.Ads.Common.Lib.AdsSoapClient.MakeApiCall(String methodName, Obj ect[] parameters) in c:\src\MyProjects\now\Common library base\adwords\compile\L ib\AdsSoapClient.cs:line 218 at Google.Api.Ads.Common.Lib.AdsSoapClient.Invoke(String methodName, Object[] parameters) in c:\src\MyProjects\now\Common library base\adwords\compile\Lib\Ad sSoapClient.cs:line 127 at Google.Api.Ads.AdWords.v201306.BudgetService.mutate(BudgetOperation[] oper ations) in c:\src\MyProjects\now\Common library base\adwords\compile\v201306\AdW ordsApi.cs:line 2133 at Google.Api.Ads.AdWords.Examples.CSharp.v201306.AddCampaigns.Run(AdWordsUse r user) in c:\Users\admin\Downloads\awapi_dotnet_lib_v16.4.0\examples\CSharp\v20 1306\BasicOperations\AddCampaigns.cs:line 86 Caused by System.Web.Services.Protocols.SoapException ([QuotaCheckError.ACCOUNT_INACTIVE @ ; trigger:'null']) at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClie ntMessage message, WebResponse response, Stream responseStream, Boolean asyncCal l) at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodN ame, Object[] parameters) at Google.Api.Ads.Common.Lib.AdsSoapClient.MakeApiCall(String methodName, Obj ect[] parameters) in c:\src\MyProjects\now\Common library base\adwords\compile\L ib\AdsSoapClient.cs:line 212 -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and discussion group: http://googleadsdeveloper.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 --- You received this message because you are subscribed to the Google Groups AdWords API Forum group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Adwords ClientLogin authentication sunset
Hi Aviv, The versions of AdWords API that support ClientLogin are expected to be sunset in June 2014. Please see the original blog post: http://googleadsdeveloper.blogspot.com/2013/09/announcing-sunset-of-clientlogin-in.html A more recent blog post includes a helpful OAuth 2.0 migration guide: http://googleadsdeveloper.blogspot.com/2013/12/adwords-api-start-your-migration-from.html Cheers, Josh, AdWords API Team On Monday, December 30, 2013 10:18:07 AM UTC-5, Aviv Oron wrote: Hi, When does the ClientLogin authentication via API will be sunset? Thanks, Aviv -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and discussion group: http://googleadsdeveloper.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 --- You received this message because you are subscribed to the Google Groups AdWords API Forum group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: AdExtensions total values
PHP Code I'm using to download my report $user-LoadService('ReportDefinitionService', ADWORDS_VERSION); // Create selector. $selector = new Selector(); $selector-fields = array(AttributeValues, Impressions, Clicks, Cost, AveragePosition); $daterange = new DateRange($start, $end); $selector-dateRange = $daterange; $predicate1 = new Predicate(); $predicate1-field = CampaignId; $predicate1-operator = IN; $predicate1-values = $campaign_ids; $selector-predicates = array($predicate1); // Create report definition. $reportDefinition = new ReportDefinition(); $reportDefinition-selector = $selector; $reportDefinition-reportName = 'Report #' . time(); $reportDefinition-dateRangeType = 'CUSTOM_DATE'; $reportDefinition-reportType = 'PLACEHOLDER_FEED_ITEM_REPORT'; $reportDefinition-downloadFormat = 'CSV'; $reportDefinition-includeZeroImpressions = FALSE; $reportData = ReportUtils::DownloadReport($reportDefinition, null, $user); torstai, 2. tammikuuta 2014 16.36.20 UTC+2 Paul Matthews (AdWords API Team) kirjoitti: Hi Joni, Can you provide us with the report definition? As this will help us explain what you're seeing. For instance, you may be using segmentation fields which means you'd get more than one result per feed item. For further information on this, please see the Placeholder Feed Item Report descriptionhttps://developers.google.com/adwords/api/docs/appendix/reports#placeholder-feed-item . Regards, - Paul, AdWords API Team. On Wednesday, 25 December 2013 21:25:00 UTC, Joni Salmi wrote: Hi, I'm having problems gettings stats for Ad Extensions. I've attached a picture in which I can't seem to understand how the total values are calculated. Most fields in picture are still in finnish, but I translated the relevant ones. The table on top of the picture is data from Placeholder Feed Item Report it seems correct but my client only wants the total values which I don't know how are calculated, how if I should use different Report Type. - Joni -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and discussion group: http://googleadsdeveloper.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 --- You received this message because you are subscribed to the Google Groups AdWords API Forum group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Commandline reporting tool
Thank you for your interest. I have added the possibility to use a --customerId flag to specify a client customer id other than the one in config. Good idea. Thanks. I have also corrected a few bugs. The OAuth 2.0 part is however rather hard on me. Gawr is now using OAuth 2.0 in a preliminary way. The users obtain an access token via https://developers.google.com/oauthplayground and the program will work for an hour. Obviously, the refresh token should be used. My answer is why are you taking about https://cloud.google.com/console#/project, clientId and clientSecret. What am I missing? I would be glad to hear anything from your or your colleague. On Tuesday, December 17, 2013 3:01:12 PM UTC+1, Anash P. Oommen (AdWords API Team) wrote: Hi Rasmus, That's a pretty useful script. I've heard a few users asking for one, but it's the first time I'm seeing a user write one and contribute to the community. Thanks a lot! One of my colleagues was experimenting with AdWords API on Node.js, I'll ask him to take a look and reach out to you. I have a couple of suggestions: - It is useful to have a --customerId flag that reads from config if one is not provided on the command line. That way, one could switch customer ids on command line w/o changing the config. - You should try to use OAuth2 as authentication mechanism, since ClientLogin protocol is deprecated and will go away in the next 6 months. The rough steps to generate one using OAuth 2.0 Playground would be as follows (I apologize, I don't have a handy guide to point you to in our documentation site): - Visit Google Cloud Console. https://cloud.google.com/console#/project - Create a new project, then register a *web* application. Provide https://developers.google.com/oauthplayground a callback url. This will give you an OAuth2 *clientId *and *clientSecret*. - Visit https://developers.google.com/oauthplayground/. Click the OAuth2.0 configuration button on the top right corner, and check Use your own OAuth credentials. Add the OAuth2 clientId and clientSecret from the Google cloud console on this page, and Save. - Do the OAuth2 flow on the main application, for scope = *https://adwords.google.com/api/adwords https://adwords.google.com/api/adwords. *At the end of the flow, the page will print out a refresh token and an access token. - In your application, you need to send the authorization header as *Authorization: Bearer access_token* instead of Authorization GoogleLogin... - Access tokens will expire in an hour, but you could use the refresh token to get a new access token. The raw http message for the same is available here: https://developers.google.com/accounts/docs/OAuth2WebServer#refresh Cheers, Anash P. Oommen, AdWords API Advisor. On Monday, December 16, 2013 6:45:06 PM UTC-5, Rasmus Ladekjær Pedersen wrote: I wrote this little node.js script to retrieve report from Google AdWords. When I myself was new to the API I would really have liked a simple script like that, and that is why I later wrote it and now post it here. https://github.com/ladekjaer/node-gawr -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and discussion group: http://googleadsdeveloper.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 --- You received this message because you are subscribed to the Google Groups AdWords API Forum group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.