code: public TokenSet renewAccessToken(String refreshToken, String apiSecret) throws IOException, KiteException, JSONException {
          String hashableText = this.apiKey + refreshToken + apiSecret;
          String sha256hex = sha256Hex(hashableText);
  
          Map<String, Object> params = new HashMap<>();
          params.put("api_key", apiKey);
          params.put("refresh_token", refreshToken);
          params.put("checksum", sha256hex);
  
          JSONObject response = new KiteRequestHandler(proxy).postRequest(routes.get("api.refresh"), params, apiKey, accessToken);
          return gson.fromJson(String.valueOf(response.get("data")), TokenSet.class);
      }
docs: Get a new access token using refresh token.
  @param refreshToken is the refresh token obtained after generateSession.
  @param apiSecret is unique for each app.
  @return TokenSet contains user id, refresh token, api secret.
  @throws IOException is thrown when there is connection error.
  @throws KiteException is thrown for all Kite trade related errors.