Jessica Hop

Jessica Hop

  • 0
  • 4
  • 285

Error when get list account from google analytics

Dec 24 2019 2:46 AM
Hi every body..
I want to get list Account from google analytics but i don't can..
here is my code
// Configure GA API.
AnalyticsService asv = new AnalyticsService("gaExportAPI_acctSample_v3.0");
// Client Login Authorization.
asv.setUserCredentials(CLIENT_USERNAME, CLIENT_PASS);
// GA Account Feed query uri.
AccountQuery query = new AccountQuery();
// Send our request to the Analytics API and wait for the results to
// come back.
AccountFeed accountFeed = asv.Query(query); (Error here)
Error: "Authentication failed: execution of request failed http:://google.com/analytics/feeds/accounts/default"
Help me, Please..

Answers (3)