code: public String newAuthorizationURL(EnumSet<AccessScope> scopes, String state) {
          Util.throwIfNull(scopes);
          if(state == null){state = "";}
  
          // Build a map of parameters for the URL
          HashMap<String,Object> params = new HashMap<String, Object>();
          params.put("response_type", "code");
          params.put("client_id", clientId);
          params.put("redirect_uri", redirectURL);
          params.put("state", state);
  
          StringBuilder scopeBuffer = new StringBuilder();
          for(AccessScope scope : scopes) {
              scopeBuffer.append(scope.name()+",");
          }
          params.put("scope",scopeBuffer.substring(0,scopeBuffer.length()-1));
  
          // Generate the URL with the parameters
          return QueryUtil.generateUrl(authorizationURL, params);
      }
docs: Generate a new authorization URL.
  
  Exceptions: - IllegalArgumentException : if scopes is null/empty
  
  @param scopes the scopes
  @param state an arbitrary string that will be returned to your app; intended to be used by you to ensure that
  this redirect is indeed from an OAuth flow that you initiated
  @return the authorization URL
  @throws UnsupportedEncodingException the unsupported encoding exception