DoubleClick Bid Manager API : ERROR 503

864 views
Skip to first unread message

a...@netbooster.com

unread,
Aug 21, 2014, 3:21:01 AM8/21/14
to google-doubleclick-...@googlegroups.com
Hello,

I got problems were connecting to the DoubleClick Bid Manager API through java code. My credentials are good, i got a token from google and my accountID, scope, P12File are good (no 4001 or 403 errors). 

The purpose is to have query last report infos and then download CSV file for further analysis on our platform.

Error stack trace : 
com.google.api.client.googleapis.json.GoogleJsonResponseException: 500 Internal Server Error
{
  "code" : 500,
  "errors" : [ {
    "domain" : "global",
    "message" : "Backend Error",
    "reason" : "backendError"
  } ],
  "message" : "Backend Error"
}

Java Code :

DoubleClickBidManager bidManager = new DoubleClickBidManager(HTTP_TRANSPORT, JSON_FACTORY, credential);
Getquery query = bidManager.queries().getquery({{QUERY_ID}});
query.setOauthToken(credential.getAccessToken());
query.setFields("metadata");
Query q = query.execute();


Please, can you check if it is a problem with the API? Maybe the code is wrong...please let me know.

Thks guys !

Tech leader !

Jonathon Imperiosi (DFA API Team)

unread,
Aug 21, 2014, 9:35:35 AM8/21/14
to google-doubleclick-...@googlegroups.com, a...@netbooster.com
Hello,

This forum is for DoubleClick for Advertisers API support. I'm afraid I'm not familiar with the DoubleClick Bid Manager API, so I can't help with this issue. You may have better luck getting an answer if you reach out to the DBM support team, instead.

Regards,
- Jonathon Imperiosi, DFA API Team

Netbooster France

unread,
Aug 22, 2014, 10:10:37 AM8/22/14
to Jonathon Imperiosi (DFA API Team), google-doubleclick-...@googlegroups.com
Thank you Jonathon.

We'll send a support request for this problem.

I have serious problem while using DFA Reporting Api with service account oauth2.

After creating my credential, i'm askink for a report with the good reportId and the good accountId, but i'm getting a 400 error with message "invalid profileId". I saw that i'm not the only person who getting this error, do you have some workaround please?

Thank you for the response.

NetBooster IT Team.

Jonathon Imperiosi (DFA API Team)

unread,
Aug 22, 2014, 10:14:00 AM8/22/14
to google-doubleclick-...@googlegroups.com, dfaapiad...@google.com, a...@netbooster.com
Hello,

The error you've provided is usually caused by an invalid user profile ID being specified.  The majority of API requests require a user profile ID, not an account ID (see reports.get, for example). Can you verify that you're passing in a valid user profile ID, and not an account ID?

Regards,
- Jonathon Imperiosi, DFA API Team

Netbooster France

unread,
Aug 22, 2014, 1:39:09 PM8/22/14
to Jonathon Imperiosi (DFA API Team), google-doubleclick-...@googlegroups.com
Excuse me, it was really the profileId (a valid one) that i passed, not the accountId. (my bad)

I think that your api doesn't support service account as OAuth2 mechanism. Can you give some java code examples about using web server flow with DFA reporting api ?

Thanks a lot. 

Jonathon Imperiosi (DFA API Team)

unread,
Aug 22, 2014, 1:45:23 PM8/22/14
to google-doubleclick-...@googlegroups.com, dfaapiad...@google.com, a...@netbooster.com
Hi,

Service accounts are supported, but they are quite tricky to use. There's a guide here that does a good job summing up the general approach you'd need to take (note: this is for a different API, but the concepts are the same).

We normally recommend the installed application flow as an alternative to service accounts. The guide linked above provides a good justification for this. Our code samples (found here) use the installed application flow, if you would like a reference. Unfortunately we don't have any DFA specific examples that use the web server flow, but you can take a look at this generic sample to get an idea of how it works.

Regards,
- Jonathon Imperiosi, DFA API Team

Reply all
Reply to author
Forward
0 new messages