# OAuth2 -  Password

A aplicação cliente da solução deve solicitar ao usuário as credenciais de acesso antes de fazer a requisição. <br>

<mark style="color:green;">`POST`</mark> `https://api.birdid.com.br/v0/oauth/pwd_authorize`

#### Headers

| Name         | Type   | Description      |
| ------------ | ------ | ---------------- |
| Content-Type | string | application/json |
| Accept       | string | application/json |

#### Request Body

| Name           | Type    | Description                                                                                                                                                                                                               |
| -------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| client\_id     | string  | Deve ter a identificação da aplicação.                                                                                                                                                                                    |
| client\_secret | string  | Deve ter o secret da aplicação                                                                                                                                                                                            |
| username       | string  | <p>Identificação do usuário por meio de CPF ou CNPJ.<br>Por ser do tipo string, preencha com zeros à esquerda (11 dígitos para CPF e 14 dígitos para CNPJ).</p>                                                           |
| password       | string  | Valor OTP                                                                                                                                                                                                                 |
| grant\_type    | string  | Sempre "password”                                                                                                                                                                                                         |
| scope          | string  | Se não informado será considerado "authentication\_session". (ver lista de escopos para Serviço de Código de Autorização )                                                                                                |
| lifetime       | integer | Valor inteiro, indica o tempo de vida desejado para o token a ser gerado em segundos.Para acesso a objeto de pessoas físicas não deve ultrapassar (7 dias),sendo que para pessoas jurídicas este limite será de (30 dias) |

{% tabs %}
{% tab title="200 " %}

```
{
    "access_token": "0c95bfe4d60a3c9f1ac66fade5111849950c4297",
    "expires_in": 259200,
    "token_type": "bearer",
    "scope": "signature_session service_2fa"
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.vaultid.com.br/workspace/cloud/api/autenticacao-de-usuarios/autenticacao-em-sistemas-desktop.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
