This commit is contained in:
Sebastien 2018-03-02 16:05:58 +01:00
parent e3ebb45c2c
commit a80f2d7ec4

View File

@ -88,7 +88,7 @@ public class YoutubeTools {
GoogleAuthorizationCodeFlow flow = new GoogleAuthorizationCodeFlow.Builder( GoogleAuthorizationCodeFlow flow = new GoogleAuthorizationCodeFlow.Builder(
HTTP_TRANSPORT, JSON_FACTORY, clientSecrets, SCOPES) HTTP_TRANSPORT, JSON_FACTORY, clientSecrets, SCOPES)
.setDataStoreFactory(DATA_STORE_FACTORY) .setDataStoreFactory(DATA_STORE_FACTORY)
.setAccessType("offline") .setAccessType("online")
.build(); .build();
Credential credential = new Autorization(flow, new LocalServerReceiver(), guild).authorize("user"); Credential credential = new Autorization(flow, new LocalServerReceiver(), guild).authorize("user");
logger.debug("Credentials saved to " + DATA_STORE_DIR.getAbsolutePath()); logger.debug("Credentials saved to " + DATA_STORE_DIR.getAbsolutePath());