Fixed
Status Update
Comments
pf...@google.com <pf...@google.com> #2
It should work now but please try again and re-open if you still don't have access.
ma...@micrologiciel.fr <ma...@micrologiciel.fr> #3
Hi the API Team,
I'd like to reopen this issue, since I encounter the same problem.
For more details, I can update any goal created trough the interface via the API, but I can't create them with the same user account.
Each time I try to create a goal, the API throws a 403 Error.
Thanks for your insight.
Max BRÖNNIMANN
Ingénieur Recherche et Développement
Ligne directe : + 33 (0)1 75 43 63 67
Micrologiciel - (Google Partner Premier)
I'd like to reopen this issue, since I encounter the same problem.
For more details, I can update any goal created trough the interface via the API, but I can't create them with the same user account.
Each time I try to create a goal, the API throws a 403 Error.
Thanks for your insight.
Max BRÖNNIMANN
Ingénieur Recherche et Développement
Ligne directe : + 33 (0)1 75 43 63 67
Micrologiciel - (Google Partner Premier)
Description
{The service analytics has thrown an exception: Google.GoogleApiException: Google.Apis.Requests.RequestError
Your project does not have access to this feature. [403]
Errors [
Message[Your project does not have access to this feature.] Location[ - ] Reason[insufficientPermissions] Domain[global]
]
at Google.Apis.Requests.ClientServiceRequest`1.<ParseResponse>d__34.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Google.Apis.Requests.ClientServiceRequest`1.Execute()}
I'm using the Google.Apis.Analytics.v3 (1.32) nuget package for creating the goal
The code I've written is:
var goal = new Goal();
goal.AccountId = accId;
goal.WebPropertyId = websiteId;
goal.ProfileId = profileId;
goal.Name = "Api Funnel";
goal.Active = true;
goal.Created = new DateTime();
goal.Type = "URL_DESTINATION";
var urlDestinationDetails = new UrlDestinationDetailsData();
urlDestinationDetails.MatchType = "EXACT";
var stepData0 = new UrlDestinationDetailsData.StepsData();
stepData0.Number = 0;
stepData0.Url = "step1";
stepData0.Name = "Step1";
var stepData1 = new UrlDestinationDetailsData.StepsData();
stepData1.Number = 0;
stepData1.Url = "step2";
stepData1.Name = "Step2";
var steps = new List<UrlDestinationDetailsData.StepsData>();
urlDestinationDetails.Steps = steps;
goal.UrlDestinationDetails = urlDestinationDetails;
goal.UrlDestinationDetails.Url = "step2";
var request = analyticsService.Management.Goals.Insert(goal, accId, websiteId, profileId);
request.Execute();
I've also added a screenshot of developer console that states that the request made to the API was returned with a 403 response status.