Re: Error API First Call
Hi Dhanya, I'm having similar issue as Santiago. Please see summary of things I've already accomplished for my first API Call: (I'm using Python 3.6 version for API calls.) *AdWords* 1) I've obtained developer token for test account 2) I've created a test MCC account 3) I've created adowrds account within my test MCC account 4) I've also created campaign, ad groups and keywords within adwords account *API Console* 1) I've got up client ID 2) I've got client secret *Refresh Token* 1) I've successfully obtained refresh token. *Yaml file:* 1) I've filled the following orange fields (I've starred out my real info though): developer_token: ** # # Optional Fields # # client_customer_id: # user_agent: INSERT_USER_AGENT_HERE # partial_failure: True # validate_only: True # # OAuth2 Configuration # # Below you may provide credentials for either the installed application or # # service account flows. Remove or comment the lines for the flow you're# # not using.# # # The following values configure the client for the installed application # flow. client_id: 93** client_secret: U* refresh_token: U* *Get Campaigns* - I'm trying to run get_campaigns.py for my first API call. But I always receive this error: charmProjects\Project_1_Test\venv\Scripts\python.exe C:/Users/OYarse01/ PycharmProjects/Project_1_Test/get_campaign.py WARNING:googleads.common:Your default encoding, cp1252, is not UTF-8. Please run this script with UTF-8 encoding to avoid errors. DEBUG:suds.transport.http:opening (https: //adwords.google.com/api/adwords/cm/v201710/CampaignService?wsdl) INFO:oauth2client.client:Refreshing access_token INFO:googleads.common:Request summary - {'methodName': get} Traceback (most recent call last): File "C:/Users/OYarse01/PycharmProjects/Project_1_Test/get_campaign.py", line 69, in main(adwords_client) File "C:/Users/OYarse01/PycharmProjects/Project_1_Test/get_campaign.py", line 52, in main page = campaign_service.get(selector) File "C:\Users\OYarse01\PycharmProjects\Project_1_Test\venv\lib\site-packages\googleads\common.py" , line 779, in MakeSoapRequest self._packer) for arg in args]) File "C:\Users\OYarse01\PycharmProjects\Project_1_Test\venv\lib\site-packages\suds\client.py" , line 521, in __call__ return client.invoke(args, kwargs) File "C:\Users\OYarse01\PycharmProjects\Project_1_Test\venv\lib\site-packages\suds\client.py" , line 581, in invoke result = self.send(soapenv) File "C:\Users\OYarse01\PycharmProjects\Project_1_Test\venv\lib\site-packages\suds\client.py" , line 613, in send reply = self.options.transport.send(request) File "C:\Users\OYarse01\PycharmProjects\Project_1_Test\venv\lib\site-packages\googleads\util.py" , line 121, in PatchedHttpTransportSend suds.transport.http.log.debug('sending:\n%s', request) File "C:\ProgramData\Anaconda3\Lib\logging\__init__.py", line 1289, in debug self._log(DEBUG, msg, args, **kwargs) File "C:\ProgramData\Anaconda3\Lib\logging\__init__.py", line 1437, in _log self.handle(record) File "C:\ProgramData\Anaconda3\Lib\logging\__init__.py", line 1446, in handle if (not self.disabled) and self.filter(record): File "C:\ProgramData\Anaconda3\Lib\logging\__init__.py", line 713, in filter result = f.filter(record) File "C:\Users\OYarse01\PycharmProjects\Project_1_Test\venv\lib\site-packages\googleads\util.py" , line 302, in filter self._REDACTED, msg) TypeError: cannot use a string pattern on a bytes-like object Process finished with exit code 1 I would appreciate your help on this. Thanks, Olek On Monday, February 19, 2018 at 4:45:21 PM UTC, Dhanya Sundararaju (AdWords API Team) wrote: > > Hi, > > I was able to pull up your account 737-186-2754. Looks like it is not a > test account. You also would need a test manager account to use the API > until your Production Developer Token is approved. Please refer this > <https://developers.google.com/adwords/api/docs/guides/first-api-call#create_test_accounts> > guide > for steps on how to create test accounts. Also, could you let me know the > MCC id of the Developer token used in your googleads.yaml file? Please let > me know if you have further questions. > > Regards, > Dhanya, AdWords API Team > -- -- =~=~=~=
Re: Creating a MCC test account.
update link in documentation https://developers.google.com/adwords/api/docs/test-accounts now its https://adwords.google.com/um/Welcome/?sf=mt and it creates regualr AW accounts. (basicall no one can create test MCC using documentatioon)=,.-..- Dne Ĩetrtek, 26. junij 2014 18.45.59 UTC+2 je oseba Josh Radcliff (AdWords API Team) napisala: > > Hi, > > For those of you who want to create a test account, *the creation link > should now be working properly*. > > https://adwords.google.com/um/StartNewMccAccount?testAccount=true > > Please post to this thread if you encounter any problems with test account > creation. > > H, to your question on your developer token application, you can contact > the API Review Team via this form > <https://services.google.com/fb/forms/apicontact/>. > > Cheers, > Josh, AdWords API Team > > On Wednesday, June 25, 2014 2:19:44 AM UTC-7, H wrote: >> >> Hi Josh >> >> Sadly that's the problem :-( >> >> We used to have an approved developer token from our application back in >> 2012, but it was later removed (probably because we stopped work on our app >> and so stopped using the API for over well over 12 months). We now have >> time/funds to continue development, we need to build more features to abide >> by the changes in RMF, but we can't test anything. >> >> I've re-applied for a token, but still waiting for a response from the >> team. (Yes, I've checked spam folder for lost messages, and I've received >> no request for follow up information since application, which is probably >> almost two weeks ago now) >> >> If I give you my MCC customer ID by private message, would you be able to >> chase our API token application? Or can you provide a suggestion as to >> what we can do next? >> >> Cheers >> H >> >> On Tuesday, June 24, 2014 8:36:36 PM UTC+1, Josh Radcliff (AdWords API >> Team) wrote: >>> >>> Hi, >>> >>> Unfortunately the team is still working on getting it resolved. In the >>> meantime, if you have an *approved* developer token you could test your >>> code against a non-test account but avoid serving any ads by making sure >>> your campaigns are all paused. >>> >>> Thanks, >>> Josh, AdWords API Team >>> >>> On Tuesday, June 24, 2014 2:30:08 AM UTC-7, H wrote: >>>> >>>> Any update? >>>> >>>> (Sorry to chase, but we're desperate to get our coding done here!) >>>> >>>> On Wednesday, June 18, 2014 9:42:38 PM UTC+1, Josh Radcliff (AdWords >>>> API Team) wrote: >>>>> >>>>> Hi, >>>>> >>>>> We're still working on fixing the test account creation process. I'll >>>>> update this post as soon as I have more information. >>>>> >>>>> Thanks, >>>>> Josh, AdWords API Team >>>>> >>>>> On Wednesday, June 18, 2014 5:58:31 AM UTC-4, H wrote: >>>>>> >>>>>> I'm having the exact same problem, unable to create a test mcc >>>>>> account, and instead it creates a non-test adwords account. >>>>>> >>>>>> Any solution to this yet? >>>>>> >>>>>> Cheers >>>>>> H >>>>>> >>>>>> >>>>>> On Wednesday, June 4, 2014 3:41:53 PM UTC+1, Josh Radcliff (AdWords >>>>>> API Team) wrote: >>>>>>> >>>>>>> Hi, >>>>>>> >>>>>>> Hmmm...the customer ID you supplied is a regular *non-test* AdWords >>>>>>> account, not an MCC account. I just went through the flow myself and >>>>>>> found >>>>>>> that the new account I created also was a regular non-test AdWords >>>>>>> account. >>>>>>> I'll follow up on this and post an update as soon as I have more >>>>>>> information. >>>>>>> >>>>>>> Thanks, >>>>>>> Josh, AdWords API Team >>>>>>> >>>>>>> On Wednesday, June 4, 2014 4:17:12 AM UTC-4, minh...@silverlining.vn >>>>>>> wrote: >>>>>>>> >>>>>>>> I have the same problem when trying to create MCC test account >>>>>>>> using the link >>>>>>>> https://adwords.google.com/um/StartNewMccAccount?testAccount=true. >&g
Unable to add template ad
Hi there, I tried uploading an ad made with Google Web Designer manually and all went fine. I'm now trying to automate this process, upload the published .zip file via a C# application, but when I try doing that I get this error: AdError.MISSING_REQUIRED_TEMPLATE_FIELDS @ operations[0].operand.ad.templateElements[0].variationSpecificFieldOverrides; trigger:'Custom_layout' I tried adding a field Custom_layout, the only type that doesn't give an error being BACKGROUND_IMAGE (I tried all types, all others trigger the invalid field error), no error is triggered on the field itself, but the error above (Custom_layout missing) is still triggered despite being in the request. Can you please help me with this issue? this is the body I send: soap:Body mutate xmlns=https://adwords.google.com/api/adwords/cm/v201409; operations operatorADD/operator operand adGroupId18375969918/adGroupId ad xsi:type=TemplateAd urlhttp://www.bannerwise.co/url displayUrlwww.bannerwise.co/displayUrl templateId419/templateId templateElements uniqueNameadData/uniqueName fields namelayout/name typeENUM/type fieldTextCustom/fieldText /fields fields nameCustom_layout/name typeBACKGROUND_IMAGE/type fieldMedia xsi:type=Image typeIMAGE/type data[byteArrayOfZipFile]/data /fieldMedia /fields /templateElements adAsImage typeIMAGE/type data[byteArrayOfZipFile]/data /adAsImage dimensions width300/width height250/height /dimensions nameTest automated web designer ad/name /ad statusPAUSED/status /operand /operations /mutate /soap:Body -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and Google+: https://googleadsdeveloper.blogspot.com/ https://plus.google.com/+GoogleAdsDevelopers/posts =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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. Visit this group at http://groups.google.com/group/adwords-api. To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/03566fc1-81f3-4ea6-b240-335686e2ff20%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Can get Auth code, can't get refresh token (test environment)
I can't get a refresh token with getRefreshToken.php in the example, but I did get the auth code. Here's more information; * I created a test MCC and two accounts in the MCC. * I got my developer token from my test MCC and put it in auth.ini * I got my clientCustomerId from an account in my MCC and put it in auth.ini * I got my client_id and client_secret which I made in the Google console and put it in auth.ini (it's an installed program) * I am running getRefreshToken.php from the console. I copied the URL in the browser, granted access and got my auth code. * I now put the auth code in the console and I get: Your OAuth2 Credentials are incorrect. Please see the GetRefreshToken.php example. { error : invalid_grant, error_description : Invalid code. } -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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: oAuth2.0 error: Credential could not be refreshed........ client.auth.oauth2.TokenResponseException: 400 Bad Request , error : invalid_grant
I had the exact same error message and solved the problem. What I was doing wrong is the following: When using GetRefreshToken and copying the url in the browser I was copying the code (starting by 4/) obtained by this page as the refreshToken in ads.properties, instead of copying this code back into the (GetRefreshToken) console and using as a refreshToken the one generated by GetRefreshToken (starting by 1/). I should have paid more attention to the instructions ! On Friday, August 2, 2013 2:33:21 AM UTC-4, Takeshi Hagikura (AdWords API Team) wrote: Hi, I guesss, it's because the account you granted access to AdWords and the account you were trying to make a request against are different (or not under the MCC you granted access). Please make sure you grant access to an MCC account or a client account. And the account you are trying to make a request is under the MCC or the client account you granted access. Best, - Takeshi, AdWords API Team On Thursday, August 1, 2013 2:37:19 AM UTC+9, Echo Li wrote: Hi Gurus, I was trying to upgrade to oAuth2 authentication from ClientLogin method, when I run the sample code I got below errors, have no clue what caused it, is it possible that the way I create the clientID and ClientSecret caused it? any reply is appreciated. Exception in thread main com.google.api.ads.common.lib.exception.OAuthException: Credential could not be refreshed. at com.google.api.ads.common.lib.auth.OfflineCredentials.generateCredential(OfflineCredentials.java:149) at DownloadCriteriaReportWithAwql.main(DownloadCriteriaReportWithAwql.java:42) Caused by: com.google.api.client.auth.oauth2.TokenResponseException: 400 Bad Request { error : invalid_grant } at com.google.api.client.auth.oauth2.TokenResponseException.from(TokenResponseException.java:105) at com.google.api.client.auth.oauth2.TokenRequest.executeUnparsed(TokenRequest.java:332) at com.google.api.client.auth.oauth2.TokenRequest.execute(TokenRequest.java:352) at com.google.api.client.auth.oauth2.Credential.executeRefreshToken(Credential.java:535) at com.google.api.client.googleapis.auth.oauth2.GoogleCredential.executeRefreshToken(GoogleCredential.java:248) at com.google.api.client.auth.oauth2.Credential.refreshToken(Credential.java:454) at com.google.api.ads.common.lib.auth.OAuth2Helper.callRefreshToken(OAuth2Helper.java:70) at com.google.api.ads.common.lib.auth.OfflineCredentials.generateCredential(OfflineCredentials.java:144) Echo -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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.