Google Directory API returns Not Authorized when call users().list().execute()
问题 I need to read the list of users (and groups) from my google domain. So I went to my Google APIs Console and enabled Admin SDK and created a Service Account to call Google APIs. I use the following google libraries google-api-services-admin-directory_v1-rev11-1.16.0-rc.jar google-api-client-1.16.0-rc.jar My code is /* * Global instance of the JSON factory. */ final JsonFactory JSON_FACTORY = JacksonFactory.getDefaultInstance(); /* Global instance of the HTTP transport. */ HttpTransport