Unable to retrieve shared secret for TOTP after enrolling push factor

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"
}'

Hey @nickmoore!

I’m not sure I’m following 100%. You shouldn’t be able to retrieve the secret for the push factor. Can you describe what are you trying to do? Maybe we can suggest an alternative.

Sorry let me clarify:

  1. Enroll TOTP Factor ONLY, able to retrieve TOTP Shared Secret (Solved Problem)
  2. Enroll Push Factor (which seems to automatically enable TOTP Factor as well). Unable to retrieve TOTP Shared Secret through the API because TOTP is being enrolled automatically.
  3. End state I need to have both TOTP and Push Factor enrolled and I need to be able to retrieve the TOTP Shared Secret.