Trying to Enroll HOTP

Trying to Enroll HOTP, after adding Custom TOTP and a profile for Enrolling(user is a member of a specific group where it is allowed). I get the following error when trying e.g.
“factorType”: “token:hotp”,
“provider”: “CUSTOM”,
“factorProfileId”: FACTOR_PROFILE_ID,
“profile”: {
“sharedSecret”: “XXXXX”
}
HTTP Error 501: 501
{“errorCode”:“E0000060”,“errorSummary”:“Unsupported operation.”,“errorLink”:“E0000060”,“errorId”:“oaerfdk9AI4S6i21z1mz3kTWQ”,“errorCauses”:}

I can add other types e.g. Security Questions usng the API so I do not see what I am missing. Anyone please?

I received the same error.

It turned out to be that the request required the activate (true or false) query string param. Eg https://{{yourOktaDomain}}/api/v1/users/:userId/factors?activate=true

Thank you for reaching out here on the Okta Developer Forum. We noticed that your question is more closely related to issues with factor enrollment. To ensure you receive the most accurate and timely assistance, we recommend reposting your query on Okta’s Community at: Okta Help Center (Lightning)

Okta’s teams on the Community are better equipped to provide the comprehensive support and guidance you need as they have the specialised knowledge and expertise in factor enrollment.

We appreciate your understanding and are committed to ensuring you receive the best possible support. If you have any other questions or issues related to Okta’s developer tools and API’s, feel free to post them here, and we’ll be happy to assist!