GET
/
tools
/
api
/
get-api-key-info
cURL
curl --request GET \
  --url https://pierre.finance/tools/api/get-api-key-info \
  --header 'Authorization: Bearer <token>'
{
  "message": "To use Pierre Finance API tools, you need to generate an API key.",
  "steps": [
    "1. Visit https://pierre.finance/api-key",
    "2. Sign in to your account",
    "3. Create a new API key or use the default one",
    "4. Copy the API key (starts with \"sk-\")",
    "5. Use this API key in your requests to other tools"
  ],
  "example": {
    "tool": "get-accounts",
    "endpoint": "GET /tools/api/get-accounts",
    "headers": {
      "Authorization": "Bearer sk-your-api-key-here",
      "Content-Type": "application/json"
    }
  },
  "note": "API keys are required for all financial data access. Keep your API key secure and never share it publicly.",
  "availableTools": [
    {
      "name": "get-accounts",
      "endpoint": "GET /tools/api/get-accounts",
      "description": "Get all financial accounts for the user",
      "requiresAuth": true
    },
    {
      "name": "get-transactions",
      "endpoint": "GET /tools/api/get-transactions",
      "description": "Get financial transactions with filters",
      "requiresAuth": true
    },
    {
      "name": "get-installments",
      "endpoint": "GET /tools/api/get-installments",
      "description": "Get installment purchases",
      "requiresAuth": true
    },
    {
      "name": "manual-update",
      "endpoint": "POST /tools/api/manual-update",
      "description": "Force manual sync of financial data",
      "requiresAuth": true
    }
  ]
}
Este endpoint retorna informações sobre como gerar e usar API keys.

Descrição

O endpoint GET /tools/api/get-api-key-info retorna informações detalhadas sobre como gerar e usar API keys para acessar os serviços da Pierre Finance.

Autenticação

Este endpoint não requer autenticação.

Resposta

Sucesso (200)

{
  "message": "To use Pierre Finance API tools, you need to generate an API key.",
  "steps": [
    "1. Visit https://pierre.finance/api-key",
    "2. Sign in to your account",
    "3. Create a new API key or use the default one",
    "4. Copy the API key (starts with \"sk-\")",
    "5. Use this API key in your requests to other tools"
  ],
  "example": {
    "tool": "get-accounts",
    "endpoint": "GET /tools/api/get-accounts",
    "headers": {
      "Authorization": "Bearer sk-your-api-key-here",
      "Content-Type": "application/json"
    }
  },
  "note": "API keys are required for all financial data access. Keep your API key secure and never share it publicly.",
  "availableTools": [
    {
      "name": "get-accounts",
      "endpoint": "GET /tools/api/get-accounts",
      "description": "Get all financial accounts for the user",
      "requiresAuth": true
    },
    {
      "name": "get-transactions",
      "endpoint": "GET /tools/api/get-transactions",
      "description": "Get financial transactions with filters",
      "requiresAuth": true
    },
    {
      "name": "get-installments",
      "endpoint": "GET /tools/api/get-installments",
      "description": "Get installment purchases",
      "requiresAuth": true
    },
    {
      "name": "manual-update",
      "endpoint": "POST /tools/api/manual-update",
      "description": "Force manual sync of financial data",
      "requiresAuth": true
    }
  ]
}

Erro Interno (500)

{
  "error": "Internal server error",
  "message": "Error details"
}

Campos da Resposta

message
string
required
Mensagem explicativa sobre o uso de API keys
steps
array
required
Array com os passos para gerar e usar uma API key
example
object
required
Exemplo de como usar a API key
note
string
required
Nota importante sobre segurança da API key
availableTools
array
required
Lista de ferramentas disponíveis na API

Exemplos de Uso

cURL

# Obter informações sobre API keys
curl -X GET 'https://pierre.finance/tools/api/get-api-key-info'

JavaScript

const BASE_URL = 'https://pierre.finance/tools/api';

async function getApiKeyInfo() {
  const response = await fetch(`${BASE_URL}/get-api-key-info`);
  return await response.json();
}

// Uso
getApiKeyInfo().then(info => {
  console.log('Passos para gerar API key:', info.steps);
  console.log('Ferramentas disponíveis:', info.availableTools);
});

Python

import requests

BASE_URL = 'https://pierre.finance/tools/api'

def get_api_key_info():
    response = requests.get(f'{BASE_URL}/get-api-key-info')
    return response.json()

# Uso
info = get_api_key_info()
print('Passos para gerar API key:', info['steps'])
print('Ferramentas disponíveis:', info['availableTools'])

Códigos de Status

  • 200: Sucesso - Informações sobre API keys retornadas
  • 500: Erro interno do servidor

Uso Recomendado

Este endpoint é útil para:
  • Desenvolvedores que estão começando a usar a API
  • Documentação que precisa explicar como obter API keys
  • Ferramentas que precisam mostrar informações sobre autenticação
  • Testes que verificam se o serviço está funcionando
Este é o único endpoint que não requer autenticação, sendo útil para verificar se o serviço está online e obter informações sobre como começar a usar a API.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Response

200 - application/json

Informações sobre API keys

The response is of type object.