# Index

1. [When to use the gov.br authentications endpoint](#quando-usar)
2. [Sending a request](#criacao-pedido)
3. [Configuration parameters](#parametros-configuracao)
4. [Response structure](#estrutura-de-resposta)
5. [Request examples](#exemplo-requisicao)

## [When to use the gov.br authentications endpoint](#quando-usar)
This endpoint returns information about the two-step authentications registered in Gov.br, from your Infosimples account.

> This endpoint has no cost.

> You can perform up to 100 queries per hour.


## [Sending a request](#criacao-pedido)
|                 |                                                          |
| --------------- | -------------------------------------------------------- |
| HTTP Method     | GET ou POST                                              |
| URL             | https://api.infosimples.com/api/admin/autenticacao-govbr |
| Response Format | JSON                                                     |


## [Configuration parameters](#parametros-configuracao)
`*`: Required parameter
| Parameter | Description                                                 |
| --------- | ----------------------------------------------------------- |
| token*    | The token that will authenticate and authorize the request. |


## [Response structure](#estrutura-de-resposta)
A response from the gov.br authentications endpoint contains, within the <code>data</code> key, an array with the following fields for each session:
| Field      | Type    | Description                                                                                                                       |
| ---------- | ------- | --------------------------------------------------------------------------------------------------------------------------------- |
| type       | string  | Type of login used. Possible values: <code>CPF/Senha</code> or <code>Certificado A1</code>.                                       |
| identifier | string  | Masked login identifier for sensitive data protection. Example: <code>***123456**</code>.                                         |
| expired    | boolean | Indicates whether the authentication has expired (<code>true</code>) or is still active (<code>false</code>).                     |
| created_at | string  | MFA session creation date and time in format <code>dd/mm/yyyy hh:mm</code>.                                                       |
| expires_at | string  | Expected MFA session expiration date and time in format <code>dd/mm/yyyy hh:mm</code>.                                            |
| expired_at | string  | Date and time when the MFA session expired in format <code>dd/mm/yyyy hh:mm</code>. Returns <code>null</code> if not yet expired. |


## [Request examples](#exemplo-requisicao)

#### Python
```python
# Tested with: Python 3.10.19, Python 3.14.0
import requests

url = "https://api.infosimples.com/api/admin/autenticacao-govbr"
args = {
  "token": "VALUE_OF_PARAMETER_TOKEN"
}

response = requests.post(url, args)
response_json = response.json()
response.close()

print(response_json)
```


### Response example

#### Success
```json
{
    "code": 200,
    "code_message": "A requisição foi processada com sucesso.",
    "data": [
        {
            "type": "CPF/Senha",
            "identifier": "***123456**",
            "expired": false,
            "created_at": "12/02/2026 08:15",
            "expires_at": "15/03/2026 10:30",
            "expired_at": null
        },
        {
            "type": "Certificado A1",
            "identifier": "***654321**",
            "expired": true,
            "created_at": "10/02/2026 12:45",
            "expires_at": "15/02/2026 14:00",
            "expired_at": "15/02/2026 14:00"
        }
    ]
}
```


#### Error
```json
{
    "code": 601,
    "code_message": "Não foi possível se autenticar com o token informado.",
    "errors": [
        "Você não tem permissão para acessar este recurso."
    ]
}
```



## We're here to help
Do you still need to figure something out? Reach us at [suporte@infosimples.com.br](mailto:suporte@infosimples.com.br) and our highly qualified support team will be happy to help.
