Complete new 2FA registration during recovery
POST
/v1/account/recover/{recoveryId}/2fa/confirm
const url = 'https://api.parasta.io/v1/account/recover/example/2fa/confirm';const options = { method: 'POST', headers: { 'Idempotency-Key': '2489E9AD-2EE2-8E00-8EC9-32D5F69181C0', 'Content-Type': 'application/json' }, body: '{"method":"passkey","setupToken":"example","credential":{"id":"example","rawId":"example","response":{"attestationObject":"example","clientDataJSON":"example"},"type":"public-key"}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.parasta.io/v1/account/recover/example/2fa/confirm \ --header 'Content-Type: application/json' \ --header 'Idempotency-Key: 2489E9AD-2EE2-8E00-8EC9-32D5F69181C0' \ --data '{ "method": "passkey", "setupToken": "example", "credential": { "id": "example", "rawId": "example", "response": { "attestationObject": "example", "clientDataJSON": "example" }, "type": "public-key" } }'Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” recoveryId
required
string
Header Parameters
Section titled “Header Parameters ” Idempotency-Key
required
string format: uuid
IETF draft-ietf-httpapi-idempotency-key-header. Generated freshly by the client for each request.
Request Body required
Section titled “Request Body required ” Media type application/json
object
method
required
string
setupToken
required
string
credential
required
object
id
required
string
rawId
required
Base64url
string
response
required
object
attestationObject
string
clientDataJSON
string
type
required
string
Responses
Section titled “ Responses ”OK
Media type application/json
object
registeredMethods
Array<string>
credentialId
string
minimumReached
boolean
Example generated
{ "registeredMethods": [ "example" ], "credentialId": "example", "minimumReached": true}