I was able to obtain the SharedSecret from the API when I enable TOTP factor
curl -X POST \
https://****.okta.com/api/v1/authn/factors \
-H 'Accept: application/json' \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
-H 'Postman-Token: ******' \
-d '{
"stateToken" : "",
"factorType": "token:software:totp",
"provider": "OKTA"
}'
However when I enable Push Factor TOTP is automatically enrolled but have no way of retrieving the shared secret from the API that I am aware of. I need to be able to support both TOTP/Push and but need a way to retrieve the TOTP shared secret. I tried deleting the TOTP factor and adding it back but I get an error.
curl -X POST \
https://******.okta.com/api/v1/authn/factors \
-H 'Accept: application/json' \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
-H 'Postman-Token:*******' \
-d '{
"stateToken" : "",
"factorType": "push",
"provider": "OKTA"
}'