Keycloak otp spring boot

Im using keycloak version 14.0.0 .I want two implement use 2fa authentication using google authenticator using spring boot .But we have custom ui with react .

Is there any way to use keycloack and get qr code image and secret configuration key via rest api ?