code: public String uri(String name) {
          try {
              return String.format("otpauth://totp/%s?secret=%s", URLEncoder.encode(name, "UTF-8"), secret);
          } catch (UnsupportedEncodingException e) {
              throw new IllegalArgumentException(e.getMessage(), e);
          }
      }
docs: Prover - To be used only on the client side
  Retrieves the encoded URI to generated the QRCode required by Google Authenticator
  
  @param name Account name
  @return Encoded URI