Google Analytics API: “User does not have sufficient permissions for this account.”
问题 I'm writing a Ruby app that accesses the Google Analytics API to pull down some experiment information. The app connects and authenticates using a Google Service Account via the following function: def connect ... @@client = Google::APIClient.new(:application_name => 'My Service App', :application_version => '1.0.0') key_file = Rails.root.join('config', 'privatekey.p12').to_s key_secret = 'somesecret' key = Google::APIClient::PKCS12.load_key(key_file, key_secret) asserter = Google::APIClient: