API to access e-CAC portal

Job ID: 30721481

Budget: $30 – $250 USD

The api needs to receive as a parameter the digital certificate in .pfx format and log into the e-cac system.
I've already developed an internal solution but over time it displays the following message:
error 1001Maximum (20) redirects followed

Access URL: https://cav.receita.fazenda.gov.br/autenticacao/login

After accessing the url, follow the steps in the images below.
Related categories: PHP JavaScript Software Architecture MySQL Web Crawling