public void requestOauthSession ( String scopes , String team ) throws Exception { if ( sessionFactory == null ) { sessionFactory = new OAuthSessionFactory ( slackApi ) ; sessionFactory . start ( ) ; } HttpUrl authorizeUrl = sessionFactory . newAuthorizeUrl ( scopes , team , session -> { initOauthSession ( session ) ; System . out . printf ( "session granted: %s\n" , session ) ; } ) ; System . out . printf ( "open this URL in a browser: %s\n" , authorizeUrl ) ; }
Shows a browser URL to authorize this app to act as this user .