Discuss regaining access to Analytics accounts, restoring accounts, changing user access levels, and navigating the homepage
 
Guide Me
star_border
Reply

insufficientPermissions

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hello sir,

i m using webproperties insert code but i can't access that can you tell me what's the problem in that

 

try {
  $property
= new Google_Service_Analytics_Webproperty();
  $property
->setName('Example Store');
  $analytics
->management_webproperties->insert('123456', $property);
} catch (apiServiceException $e) {
 
print 'There was an Analytics API service error '
     
. $e->getCode() . ':' . $e->getMessage();
} catch (apiException $e) {
 
print 'There was a general API error '
     
. $e->getCode() . ':' . $e->getMessage();
}

Request:-

POST https://www.googleapis.com/analytics/v3/management/accounts/89705531/webproperties?key={YOUR_API_KEY}
{
"name": "test",
"websiteUrl": "http://test.com",
"permissions": {
"effective": [
"COLLABORATE",
"EDIT",
"MANAGE_USERS",
"READ_AND_ANALYZE"
]
},
"industryVertical": "ARTS_AND_ENTERTAINMENT",
"level": "STANDARD",
"accountId": "89705531",
"id": "UA-89705531-1",
}
 
Response:-
{
"error": {
"errors": [
{
"domain": "global",
"reason": "insufficientPermissions",
"message": "Your project does not have access to this feature."
}
],
"code": 403,
"message": "Your project does not have access to this feature."
}
}
thanks