Validation of a CPF

Asked

Viewed 213 times

0

  • I believe for you to know this has to consume something with the IRS.

  • You need to use this service from a database with verified Cpfs.

  • In this case, only the IRS has it, right? I was searching and saw that use Webservice for this but most charge for the query, know if there are any free?

  • Use this site: https://www.geradorcpf.com/validar-cpf.htm?

  • @Davisroberto Validation is by calculation, as in my Js... https://jsfiddle.net/Lucaskazama/t5fhwn23/

1 answer

0


If you are developing a system unable to handle valid but non-existent Cpfs, the only reliable way is to consult their source in a competent body (such as the IRS, cited in the comments).

If you do not consider the possibility of consuming a paid service, I suggest reviewing the application requirements. I believe that there are no free services to meet your need; and as you have not specified the type of tool you are developing, I venture to say that a document validation may be sufficient.

If necessary, update your added question with more details about the need and we will try to help in a more specific way.

  • What I find strange is that we can consult for free the information contained in the CPF having the CPF and date of birth on the website of the Internal Revenue Service, but there is no free api or webservice :/

  • I do not know the reasons for this limitation, but I consider privacy to be one of the factors. With a free public API (or even a website without reCAPTCHA validation) it would be technically feasible to perform brute force attacks and gain mass information. Incorrect use of this data can have a negative impact on people’s safety. But that is only one point, as there are other - possibly illegal - means of obtaining this information.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.