Google Analytics Management API - Insert method - Insufficient permissions HTTP 403
The problem was I using a service account when I should have been using an installed application. I did not need a service account since I had access using my own credentials.That did the trick for me!
I am trying to add users to my Google Analytics account through the API but the code yields this error:
googleapiclient.errors.HttpError: https://www.googleapis.com/analytics/v3/management/accounts/**accountID**/entityUserLinks?alt=json returned "Insufficient Permission">
I have Admin rights to this account - MANAGE USERS. I can add or delete users through the Google Analytics Interface but not through the API. I have also added the service account email to GA as a user. Scope is set to analytics.manage.users
This is the code snippet I am using in my add_user function which has the same code as that provided in the API documentation.
def add_user(service):
try:
    service.management().accountUserLinks().insert(
        accountId='XXXXX',
           body={
            'permissions': {
                'local': [
                    'EDIT',
                ]
            },
            'userRef': {
                'email': 'ABC.DEF@gmail.com'
            }
        }
    ).execute()

  except TypeError, error:
    # Handle errors in constructing a query.
    print 'There was an error in constructing your query : %s' % error

  return None
Any help will be appreciated. Thank you!!