> For the complete documentation index, see [llms.txt](https://docs.vaultid.com.br/workspace/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.vaultid.com.br/workspace/wings/autenticacao/credenciais-de-cliente-externo.md).

# Credenciais de cliente externo

<mark style="color:green;">`POST`</mark> `/auth/client`

#### Autenticação de aplicação

**Headers**

| Name            | Value              |
| --------------- | ------------------ |
| Content-Type    | `application/json` |
| cache-control\* | no-cache           |

**Body**

| Name                  | Type   | Description                 |
| --------------------- | ------ | --------------------------- |
| client\_id **\***     | string | Identificação da aplicação. |
| client\_secret **\*** | string | Senha da aplicação          |

&#x20;**\*** Campo obrigatório

**Response**

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

```json
{
    "access_token": "dbe73a2aa90bb581dd041b1633dff9c1fdbc9b22",
    "token_type": "Bearer",
    "expires_in": 900,
    "_links": {
        "self": {
            "href": "https://billing.dev.vaultid.com.br/auth/client"
        }
    }
}
```

{% endtab %}

{% tab title="400" %}

```json
{
    "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html",
    "title": "invalid_client",
    "status": 400,
    "detail": {
        "code": 1054,
        "status": "INVALID_CLIENT_ID",
        "message": "Invalid Client ID"
    }
}
```

{% endtab %}
{% endtabs %}

#### **Exemplo**

```bash
curl -X POST \
  http://url_billing/auth/client \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -H 'cache-control: no-cache' \
  -d '{
    "client_id": "AppExternalAR",
    "client_secret": "123456"
}'
```
