Fatal Error: invalid_request

1,415 views
Skip to first unread message

Sachin Kumar

unread,
Aug 31, 2016, 2:27:23 AM8/31/16
to AdWords API Forum
I am getting this error sice today morning. Earliear the app was working fine. Now I am not knowing why this error is occurring.


Fatal error: Uncaught exception 'OAuth2Exception' with message '{ "error" : "invalid_request" }' in /home/bergstromdev/public_html/Google/Api/Ads/Common/Util/SimpleOAuth2Handler.php:119 Stack trace: #0 /home/bergstromdev/public_html/Google/Api/Ads/Common/Util/SimpleOAuth2Handler.php(96): SimpleOAuth2Handler->MakeRequest('https://account...', Array) #1 /home/bergstromdev/public_html/Google/Api/Ads/Common/Util/OAuth2Handler.php(116): SimpleOAuth2Handler->RefreshAccessToken(Array) #2 /home/bergstromdev/public_html/Google/Api/Ads/Common/Lib/AdsSoapClient.php(452): OAuth2Handler->GetOrRefreshAccessToken(Array) #3 /home/bergstromdev/public_html/Google/Api/Ads/Common/Lib/AdsSoapClient.php(199): AdsSoapClient->GenerateHttpHeaders() #4 /home/bergstromdev/public_html/Google/Api/Ads/AdWords/v201603/CampaignService.php(8048): AdsSoapClient->__soapCall('get', Array) #5 /home/bergstromdev/public_html/lib/Adwords.class.php(36): CampaignService->get(Object(Selector)) #6 /home/bergstromdev/public_html/day_dev.php(81): Adwords->GetCampai in /home/bergstromdev/public_html/Google/Api/Ads/Common/Util/SimpleOAuth2Handler.php on line 119


I am using php library of version v201603. Kindly let me know what is wrong now with the app.

Note:
If I refresh page multiple time them app returning data but at first call it generates this above mentioned fatal error.

Kindly reply asap because the site is stopped.



Thanks & Regards
Sachin Kumar

Peter Oliquino

unread,
Aug 31, 2016, 3:08:00 AM8/31/16
to AdWords API Forum
Hi Sachin,

The error suggests that you may be using the incorrect OAuth2 credentials for your account. If it was working previously, there might have been a change in the OAuth2 credentials that are being used in your auth.ini file. You could regenerate the credentials using the steps in the setting up OAuth2 authentication and getting an OAuth2 refreshToken guides.

If the issues persist, please provide through Reply privately to author the SOAP request and response or any logs so I could investigate the issue further.

Best regards,
Peter
AdWords API Team

Peter Oliquino

unread,
Aug 31, 2016, 3:37:46 AM8/31/16
to AdWords API Forum
Hi Sachin,

I would also recommend that you migrate to our latest version (v201607) to avoid any other issues as the v201603 had already been deprecated and due to be sunset soon.

Thanks,
Peter
AdWords API Team

uuta...@sina.com

unread,
Aug 31, 2016, 6:38:16 AM8/31/16
to AdWords API Forum
Dear  Peter Oliquino:
          I got the same response from 5 hours ago( '{ "error" : "invalid_request" }' ).  Our version is :v201605. 
  

在 2016年8月31日星期三 UTC+8下午3:37:46,Peter Oliquino写道:

Peter Oliquino

unread,
Aug 31, 2016, 6:49:05 AM8/31/16
to AdWords API Forum
Hi,

I would suggest to migrate to our latest version (v201607) and try regenerating your OAuth2 credentials through the setting up OAuth2 authentication and getting OAuth2 refresh tokens guides. If the issue persists, kindly Reply privately to author with your Customer ID and SOAP request and response so I can have a better look of the issue.

uuta...@sina.com

unread,
Aug 31, 2016, 7:09:18 AM8/31/16
to AdWords API Forum
Dear  Peter Oliquino:
           I have updated to v201607. Also got the same result. Our system have run for a long time and all things is ok. It happened just a few hours ago. 
I think maybe some problem happened at google servers. I try to create refresh  token again, also got the same result. 
I'm waiting for you online.

在 2016年8月31日星期三 UTC+8下午3:37:46,Peter Oliquino写道:
Hi Sachin,

Sachin Kumar

unread,
Aug 31, 2016, 10:39:44 AM8/31/16
to AdWords API Forum
Hello Peter,

I have change the oath credentilas successfully and also changed the api library to (v201607) but still facing the same problem.

Is it at google server issues or what? Kindly revert back asap.



Thanks & Regards
Sachin Kumar


uuta...@sina.com

unread,
Aug 31, 2016, 10:52:02 AM8/31/16
to AdWords API Forum
Hi Sachin Kumar
     We have the same problem. Can we make a friends? I think there are very few developer work on adwords api. If any problem, we can help each other.


在 2016年8月31日星期三 UTC+8下午10:39:44,Sachin Kumar写道:

Li Tan

unread,
Aug 31, 2016, 11:11:50 AM8/31/16
to AdWords API Forum
Same problem here.

It started happening yesterday.

 Still not working. (I reset the client secret, and regen the refresh token.)

Li Tan

unread,
Aug 31, 2016, 12:26:14 PM8/31/16
to AdWords API Forum
I upgraded to v201607 and got the same error. 

Mark Rogoyski

unread,
Aug 31, 2016, 12:50:28 PM8/31/16
to AdWords API Forum
We have also been getting the "error : invalid_request" error message intermittently since 11:33 PDT 2016-08-30.

In the stats report log, we also see these errors occurring:

Response Code: 500
Error Message: Report download failed. Underlying errors are
Type = 'ReportDownloadError.ERROR_GETTING_RESPONSE_FROM_BACKEND', Trigger = 'Unable to read report data', FieldPath = ''.

Response Code: 500
Error Message: Report download failed. Underlying errors are
Type = 'ReportDownloadError.INTERNAL_SERVER_ERROR', Trigger = 'Unexpected Internal Server Error', FieldPath = ''.

We are on v201605 of the API.

Christopher Taylor

unread,
Aug 31, 2016, 1:32:03 PM8/31/16
to AdWords API Forum
We are also constantly receiving the error, albeit intermittently since early this morning.

We are on v201607

Nadine Sundquist (AdWords API Team)

unread,
Aug 31, 2016, 1:56:33 PM8/31/16
to AdWords API Forum
Hello Everyone,

Thanks for reporting this. We're taking a look into this now. I'll post back here when I have more information.

Best,
Nadine, AdWords API Team

AdWordsAPI-Gnr

unread,
Aug 31, 2016, 2:50:38 PM8/31/16
to AdWords API Forum
stable does not work. usually gives an error. (  "error" : "invalid_request"  ) sometimes it gives good results to our request. help please.
thanks


31 Ağustos 2016 Çarşamba 20:56:33 UTC+3 tarihinde Nadine Sundquist (AdWords API Team) yazdı:

Collin Grady

unread,
Aug 31, 2016, 2:50:38 PM8/31/16
to AdWords API Forum
I've also been receiving the same error for the last 24 hours. Only 1 out of every 5-10 requests will actually go through, the rest fail with the generic {"error": "invalid_request"} with no other details.

AdWordsAPI-Gnr

unread,
Aug 31, 2016, 2:50:38 PM8/31/16
to AdWords API Forum
We've got the same problem. We use versions v201605 and v201607. Is there a problem in google server?

Jean-Guy Speton

unread,
Aug 31, 2016, 2:50:38 PM8/31/16
to AdWords API Forum
Same problem here, have been getting "error":"invalid_request" responses on RefreshAccessToken requests starting early yesterday.  They happen frequently, but usually one or more retries succeeds in getting an access token.

We're on v201607 using the same OAuth2 credentials we've been using for months with no changes on our side.  Seems pretty clear this is an issue on the Google side of things.

{
  "error" : "invalid_request"
}
#0 /opt/lothric/third-party-php/adwords-examples-and-lib-10.1.0/lib/Google/Api/Ads/Common/Util/SimpleOAuth2Handler.php(96): SimpleOAuth2Handler->MakeRequest('https://account...', Array)
#1 /opt/lothric/third-party-php/adwords-examples-and-lib-10.1.0/lib/Google/Api/Ads/Common/Util/OAuth2Handler.php(116): SimpleOAuth2Handler->RefreshAccessToken(Array)
#2 /opt/lothric/third-party-php/adwords-examples-and-lib-10.1.0/lib/Google/Api/Ads/Common/Lib/AdsSoapClient.php(452): OAuth2Handler->GetOrRefreshAccessToken(Array)
#3 /opt/lothric/third-party-php/adwords-examples-and-lib-10.1.0/lib/Google/Api/Ads/Common/Lib/AdsSoapClient.php(199): AdsSoapClient->GenerateHttpHeaders()
#4 /opt/lothric/third-party-php/adwords-examples-and-lib-10.1.0/lib/Google/Api/Ads/AdWords/Lib/AdWordsSoapClient.php(86): AdsSoapClient->__soapCall('mutate', Array)

Li Tan

unread,
Aug 31, 2016, 3:07:59 PM8/31/16
to AdWords API Forum
I upgraded to v201607.

Only 1 out of every 5 requests work, the rest fail with the generic {"error": "invalid_request"} with no other details. 

Nadine Sundquist (AdWords API Team)

unread,
Aug 31, 2016, 3:53:31 PM8/31/16
to AdWords API Forum
Hello Everyone,

I just want to be sure this isn't related to any of the client libraries. I see a lot of PHP on this thread. Did any of you recently pick up a new version of the client library? If so, what language and what version? If you're still using the same library that you were 2 weeks ago, then please also reply back, so I can get confirmation that it is or is not possibly a client library issue.

Thanks,
Nadine, AdWords API Team

Collin Grady

unread,
Aug 31, 2016, 4:00:01 PM8/31/16
to AdWords API Forum
Haven't touched library since July 13. Using v201605. Haven't changed auth info or anything else related either.

Christopher Taylor

unread,
Aug 31, 2016, 4:01:09 PM8/31/16
to AdWords API Forum
Same, haven't updated any of the libraries in several weeks.

Collin Grady

unread,
Aug 31, 2016, 4:03:33 PM8/31/16
to AdWords API Forum
Just to add, first error was recorded 2016-08-30 11:30:56 out of the blue with no changes whatsoever.

Collin Grady

unread,
Aug 31, 2016, 4:04:03 PM8/31/16
to AdWords API Forum
Oops; Pacific time. Kind of important to mention that :)

Li Tan

unread,
Aug 31, 2016, 4:08:33 PM8/31/16
to AdWords API Forum
I am using the same php lib for the last couple months. I discovered this error today.


On Wednesday, August 31, 2016 at 12:53:31 PM UTC-7, Nadine Sundquist (AdWords API Team) wrote:

Mark Rogoyski

unread,
Aug 31, 2016, 4:14:33 PM8/31/16
to AdWords API Forum
Using PHP client library 10.0.0. No change in library.
Errors started occurring around 2016-08-30 11:33:45 PDT.

Collin Grady

unread,
Aug 31, 2016, 4:21:25 PM8/31/16
to AdWords API Forum
Oh, I didn't notice there was a separate client lib version number; ours is also 10.0.0

Nadine Sundquist (AdWords API Team)

unread,
Aug 31, 2016, 4:38:24 PM8/31/16
to AdWords API Forum
Hi Everyone,

Thanks for the quick responses! You folks are awesome! That takes one possibility out of the running. I can now focus on fewer possibilities.

Thanks,
Nadine, AdWords API Team

an_api_user

unread,
Aug 31, 2016, 5:20:56 PM8/31/16
to AdWords API Forum
Also started seeing this error intermittently starting 8/30 around 16:00 PST.  Have not seen this problem before.  Still on 2016-03, will migrate to latest after this issue is fixed :)

Nadine Sundquist (AdWords API Team)

unread,
Aug 31, 2016, 5:55:08 PM8/31/16
to AdWords API Forum
Hello Everyone,

Here's an update. It looks like there are two separate issues happening on this thread. If you're getting errors similar to ERROR_GETTING_RESPONSE_FROM_BACKEND, then the issue has been resolved. You should be able to pull your reports without issues. For those of you seeing invalid_request, we're still working on trying to figure out the root cause. I'll continue to keep you posted.

Cheers,
Nadine, AdWords APi Team

Anthony Ly

unread,
Aug 31, 2016, 7:02:50 PM8/31/16
to AdWords API Forum
Still seeing the issue after migration to adwords version 201607, googleads-php-lib-12.0.0. 

An error has occurred: { "error" : "invalid_request" }

MCC Test

unread,
Sep 1, 2016, 2:19:00 AM9/1/16
to AdWords API Forum
Hello Adwords API Team,

I am also experiencing the same Issue.I am using v201603 but suddenly from yesterday I am frequently getting error like 

vendor/googleads/googleads-php-lib/src/Google/Api/Ads/Common/Util/SimpleOAuth2Handler.php : 119 : {
  "error" : "invalid_request"
}

I also tried upgrading to v201605 and v201607(latest version) but still facing same issue.

Can anyone please look into this its very critical issue?

Thanks,
Ronak Shah

Sachin Kumar

unread,
Sep 1, 2016, 7:38:11 AM9/1/16
to AdWords API Forum
I switched to php lib v201607 from v201603 and changed the oath crdentilas also still facing the same problem.

Nadine Sundquist (AdWords API Team)

unread,
Sep 1, 2016, 9:54:05 AM9/1/16
to AdWords API Forum
Hello Everyone,

Thanks for the updates. We're still working on finding the root cause of this issue. I'll send out updates as I have more information.

Cheers,
Nadine, AdWords API Team

Li Tan

unread,
Sep 1, 2016, 10:34:05 AM9/1/16
to AdWords API Forum
Is anyone using c# lib, or java lib that has this problem?

Jeff Siebach

unread,
Sep 1, 2016, 10:50:41 AM9/1/16
to AdWords API Forum
I am also receiving intermittent errors.  It is about 2/3 of the requests that don't go through, with the others saying invalid_request.  Just wanted to contribute so I'd get updates on this thread and be able to help if I can. Thanks.

Nadine Sundquist (AdWords API Team)

unread,
Sep 1, 2016, 12:12:20 PM9/1/16
to AdWords API Forum
Hello Everyone,

We've come up with a possibility, and it would really help if someone could give this a try and get back to me. If you can try this on a smaller scale first just to test the waters, that would be great. It sounds like everyone experiencing this issue is using the PHP library. Please try changing the constant ACCESS_ENDPOINT in OAuth2Handler.php from https://accounts.google.com/o/oauth2/token to https://www.googleapis.com/oauth2/v4/token. The other client libraries are using this newer endpoint for retrieving tokens, which would explain why other libraries are not seeing it. If this works for you, please post back here.

In the meantime, we'll continue looking into other possibilities.

Regards,
Nadine, AdWords API Team

Jean-Guy Speton

unread,
Sep 1, 2016, 12:23:59 PM9/1/16
to AdWords API Forum
New endpoint gives the following 400 response:

<!DOCTYPE html><html lang=en><meta charset=utf-8><meta name=viewport content="initial-scale=1, minimum-scale=1, width=device-width"><title>Error 400 (Not Found)!!1</title><style>*{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;min-height:180px;padding:30px 0 15px;}* > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}pre{white-space:pre-wrap;}ins{color:#777;text-decoration:none}a img{border:0}@media screen and (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}}#logo{background:url(//www.google.com/images/branding/googlelogo/1x/googlelogo_color_150x54dp.png) no-repeat;margin-left:-5px}@media only screen and (min-resolution:192dpi){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat 0% 0%/100% 100%;-moz-border-image:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) 0}}@media only screen and (-webkit-min-device-pixel-ratio:2){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat;-webkit-background-size:100% 100%}}#logo{display:inline-block;height:54px;width:150px}</style><div id="af-error-container"><a href=//www.google.com/><span id=logo aria-label=Google></span></a><p><b>400.</b> <ins>That’s an error.</ins><p>The requested URL was not found on this server. <ins>That’s all we know.</ins></div>

PHP google lib 10.1.0 v201607

Jeff Siebach

unread,
Sep 1, 2016, 12:25:07 PM9/1/16
to AdWords API Forum
I updated the endpoint and received a 400 error when trying to convert the code to an access token:

<!DOCTYPE html><html lang=en><meta charset=utf-8><meta name=viewport content="initial-scale=1, minimum-scale=1, width=device-width"><title>Error 400 (Not Found)!!1</title><style>*{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;min-height:180px;padding:30px 0 15px;}* > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}pre{white-space:pre-wrap;}ins{color:#777;text-decoration:none}a img{border:0}@media screen and (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}}#logo{background:url(//www.google.com/images/branding/googlelogo/1x/googlelogo_color_150x54dp.png) no-repeat;margin-left:-5px}@media only screen and (min-resolution:192dpi){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat 0% 0%/100% 100%;-moz-border-image:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) 0}}@media only screen and (-webkit-min-device-pixel-ratio:2){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat;-webkit-background-size:100% 100%}}#logo{display:inline-block;height:54px;width:150px}</style><div id="af-error-container"><a href=//www.google.com/><span id=logo aria-label=Google></span></a><p><b>400.</b> <ins>That’s an error.</ins><p>The requested URL was not found on this server. <ins>That’s all we know.</ins></div>


Stack trace:

#0 /home/servername/vendor/googleads/googleads-php-lib/src/Google/Api/Ads/Common/Util/SimpleOAuth2Handler.php(72): SimpleOAuth2Handler->MakeRequest('https://account...', Array)

Ronak Shah

unread,
Sep 1, 2016, 12:48:49 PM9/1/16
to AdWords API Forum
Hello,

I tried updating the ACCESS_ENDPOINT constant but now getting Error 400 response like below.

400. That’s an error.

The requested URL was not found on this server



Thanks,

Ronak Shah

Nadine Sundquist (AdWords API Team)

unread,
Sep 1, 2016, 12:59:19 PM9/1/16
to AdWords API Forum
HI Folks,

Thanks for giving this a try. This is making me think we may have an endpoint problem here. I'll look further into it. Just for sanity's sake I gave this command a try just to see if the endpoint was working for me outside of the library, which it is. I'm wondering if it's not accessible from the outside for some reason:

curl 'https://www.googleapis.com/oauth2/v4/token' -d 'grant_type=refresh_token&refresh_token=<insert_refresh_token_here>&client_id=<insert_client_id_here>&client_secret=<insert_client_secret_here>

Thanks everyone for your patience. It's tricky troubleshooting, since it appears it's only happening for a subset of people. I'll keep all of you updated.

Best,
Nadine, AdWords API Team

Li Tan

unread,
Sep 1, 2016, 1:14:12 PM9/1/16
to AdWords API Forum
I got 400 after I changed to https://www.googleapis.com/oauth2/v4/token

Nadine Sundquist (AdWords API Team)

unread,
Sep 1, 2016, 1:20:10 PM9/1/16
to AdWords API Forum
Greetings Everyone,

First of all, thank you to everyone for being so helpful. Did anyone have enough trace logging on to pick up the reason behind the invalid_request when it first started appearing? Was it just invalid_request without any reason?

Thanks,
Nadine, AdWords API Team

uuta...@sina.com

unread,
Sep 1, 2016, 1:36:12 PM9/1/16
to AdWords API Forum
Yes, it was just invalid_request without any reason. We haven't changed anything.  Maybe we are all php version.
Started time maybe less 10 hours before Sachin Kumar  send this error to you.

Li Tan

unread,
Sep 1, 2016, 1:37:00 PM9/1/16
to AdWords API Forum
I tried the curl with my credential. It worked for me and I got access token from it.

{
 "access_token": "xxxx",
 "token_type": "Bearer",
 "expires_in": 3600
}

AdWordsAPI-Gnr

unread,
Sep 1, 2016, 1:38:39 PM9/1/16
to AdWords API Forum
He was trying for a long time. He gave no reason error. We never make a change.


1 Eylül 2016 Perşembe 20:20:10 UTC+3 tarihinde Nadine Sundquist (AdWords API Team) yazdı:

Seth Therrien

unread,
Sep 1, 2016, 2:07:08 PM9/1/16
to AdWords API Forum
No, there was no reason in there errors.

Nadine Sundquist (AdWords API Team)

unread,
Sep 1, 2016, 4:04:42 PM9/1/16
to AdWords API Forum
Greetings!

Thanks for the responses! We're still actively working this. It's been tricky to figure out the root cause of this one.

Cheers,
Nadine, AdWords API Team

ajoh...@themorangroup.net

unread,
Sep 1, 2016, 4:05:43 PM9/1/16
to AdWords API Forum
Hi Nadine,

Hello again from New Orleans. We just met in person at the API workshop in NYC. How are you? 

I am currently experiencing the same issue with the PHP client library reporting: "invalid request". 

I thought it might have been the old version depreciating, so I updated to 201607 and I'm getting the same error. It's intermittent so sometimes the requests go through, other times not. Best of luck resolving this issue and thanks so much for your support. I'm tracking.

Best,
Alan Johnson

Nadine Sundquist (AdWords API Team)

unread,
Sep 1, 2016, 7:42:21 PM9/1/16
to AdWords API Forum
Hi Alan,

Glad you had a safe trip back! It's great that you were able to make it to the workshop. We completely understand how much trouble this is causing everyone, and my team is working together to figure this out. It's tough to nail down because it looks like it's a change in OAuth from our side, but it only appears to be affecting PHP library users sporadically. I'll let you know as soon as we make progress.

Take care,
Nadine, AdWords API Team 

Nadine Sundquist (AdWords API Team)

unread,
Sep 2, 2016, 12:52:49 AM9/2/16
to AdWords API Forum
Greetings AdWordsians,

We've made some changes on our servers, which we believe should fix the issue. Is there an improvement for anyone, or is the issue persisting?

Best,
Nadine, AdWords API Team

Ronak Shah

unread,
Sep 2, 2016, 1:07:58 AM9/2/16
to AdWords API Forum
Hello Nadine,

I tried making few requests and all of them worked fine without any issue.I will try to make some more calls to other services and let you know the results.

Thanks,
Ronak Shah

AdWordsAPI-Gnr

unread,
Sep 2, 2016, 1:14:44 AM9/2/16
to AdWords API Forum
Hello,
201 605 and 201 607 versions were tested. We did not encounter the error. We continue to test. We're glad to be resolved. Thank you.


Nadine Sundquist (AdWords API Team)

unread,
Sep 2, 2016, 7:19:39 AM9/2/16
to AdWords API Forum
Hello Everyone,

Thanks for the feedback. It's such a relief to hear that the errors disappeared! Now that we've identified where in our code the issue popped up, we're putting measures in place to make sure this doesn't pop up again. Thank you all for being SO helpful and patient. If anyone sees this happening again within the next day, please contact me immediately.

Take care,
Nadine, AdWords API Team

ajoh...@themorangroup.net

unread,
Sep 2, 2016, 9:16:55 AM9/2/16
to AdWords API Forum
Thanks API team,

All my requests are going through this morning. 

Much appreciated.

Best,
Alan

Li Tan

unread,
Sep 2, 2016, 9:44:04 AM9/2/16
to AdWords API Forum
Thanks for the help.

Ronak Shah

unread,
Sep 2, 2016, 11:14:48 AM9/2/16
to AdWords API Forum
Hello,

I tried making calls to other services like Reporting Service, Campaign Service, Adgroup Criterion Service and all worked absolutely fine :)

Thank you for resolving this issue much much appreciated!

Anthony Ly

unread,
Sep 6, 2016, 6:18:19 PM9/6/16
to AdWords API Forum
Thanks for the fix Google team!

I am receiving a new error starting today when trying to GetAccountBudget via BUDGETORDERSERVICE, adwords api 201607, googleads-php-lib-12.0.0.  This error only occurs for some accounts-can't figure out why it works fine for other accounts.  It seems like the error is related to the account since some accounts never see the error, and some always get the error.  Have not encountered this error before today.  Please let me know if you need more details.

Error: "An error has occurred: [BudgetOrderError.UNKNOWN @ ; trigger:'Couldn't find metadata for a normal terms orderline'] "

Soap_xml.log:

[Sep 06 2016 15:03:59.000000 - ERROR] POST /api/adwords/billing/v201607/BudgetOrderService HTTP/1.1
Host: adwords.google.com
Connection: Keep-Alive
User-Agent: PHP-SOAP/7.0.5, gzip
Accept-Encoding: gzip, deflate
Content-Encoding: gzip
Content-Type: text/xml; charset=utf-8
SOAPAction: ""
Content-Length: 584
Authorization: Bearer ya29.CipWA8THrOkYCHc4aAl3dUfJa8xDLQS4FU9tGJJ1Sr5K5SMlEV4LFS7lQ18

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://adwords.google.com/api/adwords/cm/v201607" xmlns:ns2="https://adwords.google.com/api/adwords/billing/v201607">
  <SOAP-ENV:Header>
    <ns2:RequestHeader>
      <ns1:clientCustomerId>XXXXXXXXXXXXX</ns1:clientCustomerId>
      <ns1:developerToken>wo0M7dwXJv55tawIajxubg</ns1:developerToken>
      <ns1:userAgent>CF_adwords_api (AwApi-PHP/12.0.0, Common-PHP/12.0.0, PHP/7.0.5)</ns1:userAgent>
    </ns2:RequestHeader>
  </SOAP-ENV:Header>
  <SOAP-ENV:Body>
    <ns2:get>
      <ns2:serviceSelector>
        <ns1:fields>BillingAccountId</ns1:fields>
        <ns1:fields>StartDateTime</ns1:fields>
        <ns1:fields>EndDateTime</ns1:fields>
        <ns1:fields>Id</ns1:fields>
        <ns1:predicates>
          <ns1:field>BillingAccountId</ns1:field>
          <ns1:operator>EQUALS</ns1:operator>
          <ns1:values>XXXX-XXXX-XXXX-XXXX</ns1:values>
        </ns1:predicates>
        <ns1:predicates>
          <ns1:field>StartDateTime</ns1:field>
          <ns1:operator>GREATER_THAN_EQUALS</ns1:operator>
          <ns1:values>20160901</ns1:values>
        </ns1:predicates>
        <ns1:predicates>
          <ns1:field>EndDateTime</ns1:field>
          <ns1:operator>LESS_THAN_EQUALS</ns1:operator>
          <ns1:values>20161201</ns1:values>
        </ns1:predicates>
        <ns1:ordering>
          <ns1:field>EndDateTime</ns1:field>
          <ns1:sortOrder>DESCENDING</ns1:sortOrder>
        </ns1:ordering>
        <ns1:paging>
          <ns1:startIndex>0</ns1:startIndex>
          <ns1:numberResults>1</ns1:numberResults>
        </ns1:paging>
      </ns2:serviceSelector>
    </ns2:get>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

HTTP/1.1 500 Internal Server Error
Content-Type: text/xml; charset=UTF-8
Content-Encoding: gzip
Date: Tue, 06 Sep 2016 22:03:59 GMT
Expires: Tue, 06 Sep 2016 22:03:59 GMT
Cache-Control: private, max-age=0
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
Server: GSE
Alt-Svc: clear
Transfer-Encoding: chunked



Message has been deleted

Anthony Ly

unread,
Sep 6, 2016, 6:20:50 PM9/6/16
to AdWords API Forum
request_info.log:

[Sep 06 2016 15:03:59.000000 - ERROR] effectiveUser=xxxxxxxxxxxx service=BudgetOrderService method=get operators={EQUALS: 1, GREATER_THAN_EQUALS: 1, LESS_THAN_EQUALS: 1} responseTime=895 requestId=00053bddf9366c900a4c494586029259 operations=1 units= server=adwords.google.com isFault=true faultMessage=[BudgetOrderError.UNKNOWN @ ; trigger:'Couldn't find metadata for a normal terms orderline']

Anthony Ly

unread,
Sep 8, 2016, 4:38:27 PM9/8/16
to AdWords API Forum
Hi, The latest error has disappeared today. Thanks!!!

Burak Karakan

unread,
Dec 8, 2016, 1:20:06 PM12/8/16
to AdWords API Forum
Hello. I am having the same problem today. For like more than 8 hours, I am getting the "invalid_request" error from every request. I am trying to authenticate new users but keep getting the same error. I also tried 2 different web app client credentials, and in order to check if I something has changed since the last time I updated the code, I also ran the example files GetRefreshToken.php and GetRefreshTokenWithoutIniFile.php with a native client, but when I give the authorization code, I get the same error. I did not change anything in my code for at least 5 days, everything was working well, but when I tried this morning, I got this error. Anything to check on your side, or is this completely my mistake?

Thanks a lot.

2 Eylül 2016 Cuma 14:19:39 UTC+3 tarihinde Nadine Sundquist (AdWords API Team) yazdı:

Nadine Sundquist (AdWords API Team)

unread,
Dec 8, 2016, 4:27:51 PM12/8/16
to AdWords API Forum
Hello Burak,

That error can come up for a number of reasons. It doesn't look like the same issue from September. Could you please start a new thread with your issue, so we can look at it separately? I believe it may have a different root cause.

Thanks,
Nadine, AdWords API Team

Burak Karakan

unread,
Dec 9, 2016, 8:21:40 AM12/9/16
to AdWords API Forum
Thanks Nadine, starting the thread now.
Reply all
Reply to author
Forward
0 new messages