Pular para o conteúdo principal
Toda função implantada está protegida por padrão com um runtime token. Requisições sem token válido recebem 401 Unauthorized.

Início rápido

1

Implante sua função

jelou deploy
# ✓ Deployed
# ▸ URL: https://minha-funcao.fn.jelou.ai
# ⚠ A default runtime token was created for this function.
#   Save it now — it will not be shown again.
# ▸ Token    jfn_rt_abc123...
O primeiro deploy gera automaticamente um runtime token.
Salve o token imediatamente. Ele não será exibido novamente. Se perdê-lo, crie um novo com jelou tokens create.
2

Chame com o token

curl -X POST https://minha-funcao.fn.jelou.ai \
  -H "Content-Type: application/json" \
  -H "X-Jelou-Token: jfn_rt_abc123..." \
  -d '{"query": "test"}'
Resposta bem-sucedida:
{ "results": [] }
Sem token ou com token inválido:
{ "error": "Unauthorized", "message": "Missing or invalid X-Jelou-Token header" }

Como funciona

  1. No primeiro deploy, a plataforma gera um runtime token (prefixo jfn_rt_)
  2. Cada requisição deve incluir esse token no header X-Jelou-Token
  3. Se o token for válido, a requisição chega ao handler. Caso contrário, retorna 401

Rotas sem autenticação

As rotas /__health e /openapi.json nunca requerem token. Os triggers cron também não — a plataforma os autentica automaticamente.

Exemplos de uso

curl -X POST https://minha-funcao.fn.jelou.ai \
  -H "Content-Type: application/json" \
  -H "X-Jelou-Token: jfn_rt_abc123..." \
  -d '{"telefone": "5511987654321"}'
A plataforma não valida nada — seu código é responsável.