title: Hello Analytics API: Java quickstart errors
body: <p>I'm trying to access data from the Google analytics reporting API using Java.</p>
  
  <p>I was following the "<a href="https://developers.google.com/analytics/devguides/reporting/core/v3/quickstart/installed-java" rel="nofollow noreferrer">Hello Analytics API: Java quickstart for installed applications</a>" tutorial, and i did everything it tells you, and i get following issues:</p>
  
  <pre><code>com.google.api.client.util.store.FileDataStoreFactory setPermissionsToOwnerOnly
  WARNING: unable to change permissions for everybody: C:\Users\&lt;user&gt;\.store\hello_analytics
  com.google.api.client.util.store.FileDataStoreFactory setPermissionsToOwnerOnly
  WARNING: unable to change permissions for owner: C:\Users\timst\.store\hello_analytics
  java.lang.NullPointerException
            at java.io.Reader.&lt;init&gt;(Reader.java:78)
            at java.io.InputStreamReader.&lt;init&gt;(InputStreamReader.java:72)
            at com.example.demo.HelloAnalytics.initializeAnalytics(HelloAnalytics.java:60)
            at com.example.demo.HelloAnalytics.main(HelloAnalytics.java:44)
  </code></pre>
  
  <p>I tried using the full path for the <code>client_secret.json</code>.
  tried using different methods i found online, but none seem to work.</p>
  
  <p>After getting frustrated by this error i tried the "<a href="https://developers.google.com/analytics/devguides/reporting/core/v3/quickstart/service-java" rel="nofollow noreferrer">Hello Analytics API: Java quickstart for service accounts</a>" tutorial.</p>
  
  <p>But here i have the issue that i can't add users to the account, property or view for the accounts i can access.
  I have access to other peoples analytics accounts and I can only remove myself from the accounts.</p>
  
  <p>All code I'm using is from the tutorials, using <code>Intellij</code> and <code>gradle</code>.</p>
  
  <hr>
  
  <blockquote>
    <p><code>tl;dr;</code> All I want to do is access the analytics data for all my
    accounts, using the reporting API so i can put all this data in my own
    database and  use this database for my other projects.
    the Tutorials google provides doesn't work for me. (the data is mostly Google Adwords data.)</p>
  </blockquote>