# Criando usuário desenvolvedor

## Criando uma conta de desenvolvedor

{% hint style="warning" %}
Assim que o usuário for criado salve o ID, pois vamos precisar para criar o token da aplicação.
{% endhint %}

Para criar uma conta desenvolvedor, enviar uma solicitação para o endpoint <mark style="color:blue;">`https://api.themembers.com.br/api/register`</mark>.    &#x20;

Vamos la! Bora começar! :tada:

## Exemplo de criação de usuário desenvolvedor:

<mark style="color:green;">`POST`</mark> `https://api.themembers.com.br/api/register`

Abaixo os parâmetros para criação de usuário desenvolvedor.

#### Request Body

| Name                                                   | Type   | Description                |
| ------------------------------------------------------ | ------ | -------------------------- |
| name<mark style="color:red;">\*</mark>                 | string | Nome do desenvolvedor      |
| document<mark style="color:red;">\*</mark>             | string | Documento do desenvolvedor |
| email<mark style="color:red;">\*</mark>                | string | E-mail do desenvolvedor    |
| phone<mark style="color:red;">\*</mark>                | string | Telefone do desenvolvedor  |
| corporation\_name<mark style="color:red;">\*</mark>    | string | Nome da empresa            |
| corporation\_cnpj<mark style="color:red;">\*</mark>    | string | CNPJ da empresa            |
| app\_name<mark style="color:red;">\*</mark>            | string | Nome do aplicativo         |
| app\_desc<mark style="color:red;">\*</mark>            | string | Descrição do aplicativo    |
| corporation\_address<mark style="color:red;">\*</mark> | string | Endereço da empresa        |

{% tabs %}
{% tab title="200 Conta criada com sucesso (Retornará o usuário)" %}

```javascript
[
    {
        "id": UUID, // ID DO USUÁRIO DESENVOLVEDOR
        "name": "Seu nome",
        "document": "123.456.789-98",
        "email": "email@email.com",
        "phone": "(00) 00 00000-9999",
        "corporation_name": "Empresa Teste",
        "corporation_cnpj": "00.000.000/0001-00",
        "corporation_address": "Rua teste, Nº 15, Bairro teste, Cidade-SP",
        "app_name": "teste-teste",
        "app_desc": "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.",
        "token": null,
        "token_status": 0,
        "created_at": null,
        "updated_at": null
    }
]
```

{% endtab %}

{% tab title="401 Não autorizado (Verifique os campos)" %}

{% endtab %}
{% endtabs %}

Agora vamos gerar o token da aplicação usando o `ID` do seu usuário:

## Gerar token do desenvolvedor

<mark style="color:green;">`POST`</mark> `https://api.themembers.com.br/api/generate-token`

O token de desenvolvedor sempre será utilizado em requisições. Assim que criado, garanta que ele sempre seja enviado sempre.

#### Request Body

| Name                                       | Type | Description                   |
| ------------------------------------------ | ---- | ----------------------------- |
| user\_id<mark style="color:red;">\*</mark> | UUID | ‘ID’ do usuário desenvolvedor |

{% tabs %}
{% tab title="200: OK Token gerado com sucesso" %}

```javascript
{
    "token" : "uuid"  //SALVE SEU TOKEN DE DESENVOLVEDOR
}
```

{% endtab %}

{% tab title="401: Unauthorized Usuário não encontrado" %}

```javascript
{
    // Response
}
```

{% endtab %}
{% endtabs %}

### Parabéns :tada:

Agora você pode se conectar fazer requisições na API de Registro e Atualização de usuários da The Members!


---

# 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://documentation.themembers.dev.br/api-gerenciamento-de-usuarios/referencia-da-api/criando-usuario-desenvolvedor.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.
