peyman gilmour February 2016

Service account Authentication in google analytics api

I use google analytics api .net . I use exactly these sample codes here. When i use Oauth 2.0 , i have no problem and every thing works good . But when i want to use Service account Authentication , i get null here ( x is null)

 var x = DaimtoAnaltyicsReportingHelper.Get(service, "78110423", "10daysAgo", "today", "ga:sessions", options);

What is missed ?

(I already created p12 file and have service account email )

Answers


peyman gilmour February 2016

The solution : I needed to add Service account email (which has been made in google developers consol) to user management in google analytics panel and give it permission .

Post Status

Asked in February 2016
Viewed 2,553 times
Voted 13
Answered 1 times

Search




Leave an answer