This method is used when you need to re-send SMS to a person who approve creating or updating data about himself.
This method can be used to send to the same number that was sent after the Create/Update person request.This endpoint is used to send to person’s another authentication method after Update person request. The sms is sended by default to auth_method which has field is_primary = True.At the response of Update person request and Get by ID in the block urgent has the array of all person’s methods of authentication. There is the alias of the methods. In request of endpoint Resend auth method transfer alias and the type of authentication to send an SMS to it.
Specification
Apiary: Resend Authorization method on Person Request
Authorize
Verify the validity of access token
Check user scope person_request:write in order to perform this action
Validate
Validate auth method. Person must has auth_method.type = OTP or THIRD_PERSON( where third_person.auth_method.type = OTP)
Check that person_request.status = NEW
Generate upload URL
If person choose auth_method = OFFLINE or third person (and this third_person.auth_method = offline):
Generate URL's with type person.{$.person.documents.[:].type} ( or third_person.documents[:].type)
And make links that were generated on the update are not valid
Generate verification code
Invoke Initialize OTP to generate one time password and send it to client number.
At this stage, the person receives an SMS message to confirm creating or updating a person's data.
cURL example
curl -X POST \ http://localhost:4000/verifications \ -H 'content-type: application/json' \ -d '{ "phone_number": "+380958697084" }' |
Make code that was generated on the creating or updating is not valid.
Change
Save in il.person|_request in the field authentication_method_current that auth_method_type that person selected