What does a Error 400, Bad Request mean?

664 views
Skip to first unread message

Tiv

unread,
Aug 6, 2014, 2:26:35 AM8/6/14
to google-doubleclick...@googlegroups.com
i am trying to submit line items to be created on our test network via the PHP api. some of my submissions work, but other times i get a 400 Error back saying "Bad Request".

Any thoughts on what this could mean?

thanks!

Vincent Tsao (DFP API Team)

unread,
Aug 6, 2014, 10:40:42 AM8/6/14
to google-doubleclick...@googlegroups.com
(1) Can you please send me a snippet of your code and I'll take a look?
(2) What is your network ID?

Thanks,
Vincent Tsao, DFP API Team

Vlad Katz

unread,
Aug 6, 2014, 8:04:30 PM8/6/14
to dfpapi-advi...@google.com, google-doubleclick...@googlegroups.com
Our network id is 79958275.

It's difficult for me to pull a snippet as the code pulls in various parameters from various sources to build the line items submitted.  i'm just confused as to what this error even means?  usually, we get a normal dfp error such as DUPLICATE_NAME  or Common.NOT_FOUND etc with a reference to which of the multiple line items caused it.  i'm not sure what a "bad request" is (esp if the request is put together by the dfp php api)?

*v


--
You received this message because you are subscribed to a topic in the Google Groups "Google's DoubleClick for Publishers API Forum" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-doubleclick-for-publishers-api/Vo9SaoQBUT4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-doubleclick-for-p...@googlegroups.com.
To post to this group, send email to google-doubleclick...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-doubleclick-for-publishers-api.
For more options, visit https://groups.google.com/d/optout.

Vincent Tsao (DFP API Team)

unread,
Aug 7, 2014, 10:46:25 AM8/7/14
to google-doubleclick...@googlegroups.com, dfpapi-advi...@google.com
An HTTP 400 error is at the HTTP layer and means it didn't even get to the API layer. So it had trouble communicating with the Google servers before any API request was even processed by us. There may be network related issues on your end causing this, or it could be a temporary server load issue on our end sometimes (but this is rare).

Without more context about the requests you are making or your code, this is difficult for us to diagnose. Do you have the SOAP XML logs for the request you're making? Or enable verbose PHP logging (log all) and send me those?

Thanks,
Vincent Tsao, DFP API Team


On Wednesday, August 6, 2014 8:04:30 PM UTC-4, Tiv wrote:
Our network id is 79958275.

It's difficult for me to pull a snippet as the code pulls in various parameters from various sources to build the line items submitted.  i'm just confused as to what this error even means?  usually, we get a normal dfp error such as DUPLICATE_NAME  or Common.NOT_FOUND etc with a reference to which of the multiple line items caused it.  i'm not sure what a "bad request" is (esp if the request is put together by the dfp php api)?

*v
On Wed, Aug 6, 2014 at 7:40 AM, Vincent Tsao (DFP API Team) <dfpapi-advisor+vincent@google.com> wrote:
(1) Can you please send me a snippet of your code and I'll take a look?
(2) What is your network ID?

Thanks,
Vincent Tsao, DFP API Team


On Wednesday, August 6, 2014 2:26:35 AM UTC-4, Tiv wrote:
i am trying to submit line items to be created on our test network via the PHP api. some of my submissions work, but other times i get a 400 Error back saying "Bad Request".

Any thoughts on what this could mean?

thanks!

--
You received this message because you are subscribed to a topic in the Google Groups "Google's DoubleClick for Publishers API Forum" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-doubleclick-for-publishers-api/Vo9SaoQBUT4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-doubleclick-for-publishers-api+unsubscribe@googlegroups.com.
To post to this group, send email to google-doubleclick-for-publishers-api@googlegroups.com.

Vincent Tsao (DFP API Team)

unread,
Aug 7, 2014, 4:24:35 PM8/7/14
to google-doubleclick...@googlegroups.com
So at first glance, that seems like a huge request, which may be causing a timeout or SOAP request being too large issue. I have to look into it some more. Will reply here when I have more info.

Thanks,
Vincent Tsao, DFP API Team


Vlad Katz

unread,
Aug 7, 2014, 4:30:54 PM8/7/14
to dfpapi-advi...@google.com, google-doubleclick...@googlegroups.com
Thanks Vincent!  i wasn't aware there was a limit to the size of requests. i was specifically told my dfp support before that i should batch my requests and send them to dfp using the suggested page size of 500.  please let me know if this is not the case, and if so, how many line items i should be submitting at a time.  thanks!

*v


To unsubscribe from this group and all its topics, send an email to google-doubleclick-for-p...@googlegroups.com.
To post to this group, send email to google-doubleclick...@googlegroups.com.

Chris Seeley (DFP API Team)

unread,
Aug 8, 2014, 10:00:05 AM8/8/14
to google-doubleclick...@googlegroups.com, dfpapi-advi...@google.com
Batching requests is definitely a good idea. The suggested page size of 500 is a good guideline, but if you are working with large line item objects you may need to decrease the page size to avoid errors. It looks like you're using a lot of targeting criteria in your line items, which is increasing the size of your request. Try decreasing your page size and let us know if you still run into issues.

Thanks,
Chris Seeley, DFP API team


On Thursday, August 7, 2014 4:30:54 PM UTC-4, Tiv wrote:
Thanks Vincent!  i wasn't aware there was a limit to the size of requests. i was specifically told my dfp support before that i should batch my requests and send them to dfp using the suggested page size of 500.  please let me know if this is not the case, and if so, how many line items i should be submitting at a time.  thanks!

*v

Vlad Katz

unread,
Aug 8, 2014, 1:01:21 PM8/8/14
to dfpapi-adv...@google.com, google-doubleclick...@googlegroups.com, Vincent Tsao
500 is what we had it set for initially.  When we started getting "bad request" errors, we dropped it to 100 (the text file with the error that i attached to a previous email only had 100 line items).  is it possible that 100 is still too much?

*v


To unsubscribe from this group and all its topics, send an email to google-doubleclick-for-p...@googlegroups.com.
To post to this group, send email to google-doubleclick...@googlegroups.com.

Chris Seeley (DFP API Team)

unread,
Aug 8, 2014, 3:50:30 PM8/8/14
to google-doubleclick...@googlegroups.com, dfpapi-adv...@google.com, dfpapi-advi...@google.com
It's possible, and as Vincent noted that request was still pretty large. Does dropping the page size even more help? 

Thanks,
Chris Seeley, DFP API Team

On Friday, August 8, 2014 1:01:21 PM UTC-4, Tiv wrote:
500 is what we had it set for initially.  When we started getting "bad request" errors, we dropped it to 100 (the text file with the error that i attached to a previous email only had 100 line items).  is it possible that 100 is still too much?

*v

Vlad Katz

unread,
Aug 8, 2014, 4:05:00 PM8/8/14
to dfpapi-adv...@google.com, google-doubleclick...@googlegroups.com, Vincent Tsao
We havent tried dropping the page size below 100.  what do you think is an acceptable value?  we dont want to drop it *too* low and lose the benefits of batching our requests...

thanks!

*v


To unsubscribe from this group and all its topics, send an email to google-doubleclick-for-p...@googlegroups.com.
To post to this group, send email to google-doubleclick...@googlegroups.com.

Chris Seeley (DFP API Team)

unread,
Aug 11, 2014, 9:04:57 AM8/11/14
to google-doubleclick...@googlegroups.com, dfpapi-adv...@google.com, dfpapi-advi...@google.com
You can try halving the page size until the requests go through without issue. If you still have problems when your batch size is very small, we can look into the requests more and see if there's a way of optimizing them.

Thanks,
Chris Seeley, DFP API Team

On Friday, August 8, 2014 4:05:00 PM UTC-4, Tiv wrote:
We havent tried dropping the page size below 100.  what do you think is an acceptable value?  we dont want to drop it *too* low and lose the benefits of batching our requests...

thanks!

*v
Reply all
Reply to author
Forward
0 new messages