> ## Documentation Index
> Fetch the complete documentation index at: https://docs.menuia.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Verificar OTP

## Descrição

Este endpoint permite verificar um código OTP (One-Time Password) previamente enviado para um número de telefone.

### Parâmetros

<ParamField body="appkey" type="string" required>
  Chave de aplicação.
</ParamField>

<ParamField body="authkey" type="string" required>
  Chave de autenticação do usuário.
</ParamField>

<ParamField body="to" type="string" required>
  Número de telefone no formato internacional para o qual o OTP foi enviado.
</ParamField>

<ParamField body="message" type="string" required>
  Deve ser `"false"` para indicar que não será enviado um novo OTP.
</ParamField>

<ParamField body="verificarOTP" type="string" required>
  Código OTP que será verificado.
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://chatbot.menuia.com/api/create-message \
    -H "Content-Type: application/json" \
    -d '{
      "appkey": "SUA_APPKEY_AQUI",
      "authkey": "SUA_AUTHKEY_AQUI",
      "to": "+5511999999999",
      "message": "false",
      "verificarOTP": "225614"
    }'
  ```

  ```javascript Node.js theme={null}
  const response = await fetch('https://chatbot.menuia.com/api/create-message', {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({
      appkey: 'SUA_APPKEY_AQUI',
      authkey: 'SUA_AUTHKEY_AQUI',
      to: '+5511999999999',
      message: 'false',
      verificarOTP: '225614'
    })
  });
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      'https://chatbot.menuia.com/api/create-message',
      json={
          'appkey': 'SUA_APPKEY_AQUI',
          'authkey': 'SUA_AUTHKEY_AQUI',
          'to': '+5511999999999',
          'message': 'false',
          'verificarOTP': '225614'
      }
  )
  ```

  ```php PHP theme={null}
  $response = Http::post('https://chatbot.menuia.com/api/create-message', [
      'appkey' => 'SUA_APPKEY_AQUI',
      'authkey' => 'SUA_AUTHKEY_AQUI',
      'to' => '+5511999999999',
      'message' => 'false',
      'verificarOTP' => '225614'
  ]);
  ```
</RequestExample>

<ResponseExample>
  ```json 200 - OTP válido theme={null}
  {
    "status": 200,
    "message": "OTP verificado com sucesso.",
    "valid": true
  }
  ```

  ```json 401 - OTP inválido theme={null}
  {
    "status": 401,
    "message": "OTP inválido ou expirado.",
    "valid": false
  }
  ```

  ```json 404 - Dispositivo não encontrado theme={null}
  {
    "status": 404,
    "message": "Nenhum dispositivo encontrado."
  }
  ```
</ResponseExample>
