Google Analytics Management Api filters get function parameters in reverse order PHP user does not have sufficient permissions to this account

26 views
Skip to first unread message

Antti Nylund

unread,
Aug 25, 2015, 8:36:35 AM8/25/15
to Google Analytics Management API
Hello,

I did not run to solution to this issue anywhere, please remove if duplicate.

I tried to retrieve filter information for Google Analytics account and constantly got 'user does not have sufficient permissions to this account' error
After several hours of cursing and head banging (no there was no good music playing) I happened to glance the GET request and noticed that
filter ID and account ID had switched places.

So its 
$analytics->management_filters->get($filter_id, $account_id);

while all documentation implies otherwise. Hope this helps someone. If already posted sorry about the spam.

Matthew Cohoon

unread,
Aug 25, 2015, 12:01:01 PM8/25/15
to Google Analytics Management API
I would check how you are populating the the $filter_id and $account_id variables. The source code and my direct attempts all have the signature being  public function get($accountId, $filterId, $optParams = array())

-Matt

--
You received this message because you are subscribed to the Google Groups "Google Analytics Management API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-analytics-mana...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Antti Nylund

unread,
Aug 25, 2015, 1:08:40 PM8/25/15
to google-analytic...@googlegroups.com

I inserted them directly as strings first so there should not be any mix up with the variable contents... There was great deal of sleep deprivation involved /disclaimer

You received this message because you are subscribed to a topic in the Google Groups "Google Analytics Management API" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-analytics-management-api/tQjQ-upZheE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-analytics-mana...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages