Hi Anash,
Details are correct, I could able to get the details of
"ServicedAccountService", following code is working fine, I'm able to
see the account details
Problem is only with Campaign + Keywords etc.,
ServicedAccountService servicedAccountService =
(ServicedAccountService)user.GetService(AdWordsService.v201101.ServicedAccountService);
string AcountDetailsQuery = null;
ServicedAccountSelector selector = new
ServicedAccountSelector();
selector.serviceTypes = new ServiceType[]
{ ServiceType.UI_AND_API, ServiceType.API_ONLY };
selector.enablePaging = false;
try
{
ServicedAccountGraph graph =
servicedAccountService.get(selector);
if (graph != null && graph.accounts != null)
{
// Display the accounts.
//AcountDetailsQuery += "There are {0} customers
under this account hierarchy." + graph.accounts.Length;
for (int i = 0; i < graph.accounts.Length; i++)
{
AcountDetailsQuery +=
graph.accounts[i].customerId + "<br>" + graph.accounts[i].login +
"<br>" + graph.accounts[i].companyName + "<br>" +
graph.accounts[i].canManageClients + "<hr>";
}
// Display the links.
foreach (Link link in graph.links)
{
AcountDetailsQuery += "LINKS" +
link.typeOfLink + "<br>" + link.serviceType + "<br>" +
link.managerId.id + "<br>" + link.clientId.id + "<hr>";
}
}
}
catch (Exception ex)
{
AcountDetailsQuery += "Failed to retrieve accounts.
Exception says \"{0}\"" + ex.Message;
}
return AcountDetailsQuery;
On Jul 8, 11:15 am, "Anash P. Oommen" <[email protected]>
wrote:
> Hi Sahdev,
>
> I can think of 2 possible reasons:
>
> 1. The campaign id is wrong.
> 2. The clientEmail/clientCustomerId set on the user object doesn't own the
> campaignId you are providing.
>
> Could you confirm if these details are correct at your end? Let me know if
> you have more questions.
>
> Cheers,
> Anash P. Oommen,
> AdWords API Advisor.
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en