There are several sample codes for how to programmatically obtain oauth2 authorization. I copied the code and named my class UtubeUploadAll. My code follows:
private Credential authorize(List<String> scopes) throws Exception {
// Load client secrets.
InputStream cs = UtubeUpload.class.getResourceAsStream(
"/client_secret.json");
GoogleClientSecrets clientSecrets = new GoogleClientSecrets();
The statement:
InputStream cs = UtubeUpload.class.getResourceAsStream(
"/client_secret.json");
always returns null, no matter where I put the client_secrets.json file. I've put it in directory src, src/main, src/main/java, src/main/res... every place I can think of. I must completely mis-understand something here but I know not what. Can somebody help me out?