Command Palette

Search for a command to run...

Назад к скиллам
скилл № 91919

quickbooks-online

Integrate with the QuickBooks Online API via OAuth2 to manage invoices, bills, expenses, customers, vendors, and pull financial reports. Use when: connecting…

БесплатноБез исполняемых скриптов
TerminalSkillsот TerminalSkills★ 221 звезда на GitHub

Установить quickbooks-online в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

QuickBooks Online

Overview

Connect an application to QuickBooks Online (QBO) through the Intuit Developer REST API (v3). This skill covers OAuth 2.0, customers, vendors, invoices, payments, bills, expenses and reports, against the sandbox or production.

Facts that changed and that older code gets wrong (Intuit documentation and release notes):

  • Minor versions: versions 1-74 were retired on 1 August 2025; requests with a lower or missing minorversion are served as 75. Send minorversion=75 (or newer) explicitly.
  • Tokens: access tokens last 60 minutes. The refresh-token value changes about every 24 hours (on the next refresh after that), and the previous value expires, so save the new refresh_token from every refresh response. A refresh token unused for 100 days expires, and all of them have a hard five-year limit; an expired or old one returns invalid_grant and the customer must reauthorize.
  • Limits: 500 requests per minute per realm, 10 per second per realm and app, batch requests throttled per realm (recommended 30 operations per batch), queries return at most 1,000 entities, requests over 120 seconds fail, throttled calls return 429 (wait 60 seconds).

Instructions

Step 1: OAuth 2.0

Register the app at developer.intuit.com. Use the scope com.intuit.quickbooks.accounting (add openid only if you need sign-in; add the payments scope only for QuickBooks Payments). The authorization page is https://appcenter.intuit.com/connect/oauth2; the token endpoint is https://oauth.platform.intuit.com/oauth2/v1/tokens/bearer. Intuit also publishes official clients (pip install intuit-oauth, npm install intuit-oauth).

# qbo_auth.py
import base64, json, os, secrets, time
from urllib.parse import urlencode
import requests

CLIENT_ID = os.environ["QBO_CLIENT_ID"]
CLIENT_SECRET = os.environ["QBO_CLIENT_SECRET"]
REDIRECT_URI = os.environ["QBO_REDIRECT_URI"]
ENVIRONMENT = os.environ.get("QBO_ENVIRONMENT", "sandbox")  # sandbox | production
TOKEN_FILE = os.environ.get("QBO_TOKEN_FILE", ".qbo_tokens.json")  # keep out of git, chmod 600
MINOR_VERSION = "75"
TOKEN_URL = "https://oauth.platform.intuit.com/oauth2/v1/tokens/bearer"
BASE_URL = {
    "sandbox": "https://sandbox-quickbooks.api.intuit.com",
    "production": "https://quickbooks.api.intuit.com",
}[ENVIRONMENT]

def auth_url(state: str) -> str:
    return "https://appcenter.intuit.com/connect/oauth2?" + urlencode({
        "client_id": CLIENT_ID, "scope": "com.intuit.quickbooks.accounting",
        "redirect_uri": REDIRECT_URI, "response_type": "code", "state": state,
    })

def _token_request(data: dict) -> dict:
    basic = base64.b64encode(f"{CLIENT_ID}:{CLIENT_SECRET}".encode()).decode()
    r = requests.post(TOKEN_URL, data=data, timeout=30, headers={
        "Authorization": f"Basic {basic}", "Accept": "application/json",
        "Content-Type": "application/x-www-form-urlencoded"})
    r.raise_for_status()
    return r.json()

def _save(tokens: dict) -> dict:
    tokens["expires_at"] = time.time() + tokens["expires_in"]
    fd = os.open(TOKEN_FILE, os.O_WRONLY | os.O_CREAT | os.O_TRUNC, 0o600)
    with os.fdopen(fd, "w") as f:
        json.dump(tokens, f)
    return tokens

def exchange_code(code: str, realm_id: str) -> dict:
    tokens = _token_request({"grant_type": "authorization_code", "code": code,
                             "redirect_uri": REDIRECT_URI})
    tokens["realm_id"] = realm_id
    return _save(tokens)

def get_valid_token() -> tuple[str, str]:
    with open(TOKEN_FILE) as f:
        tokens = json.load(f)
    if time.time() >= tokens["expires_at"] - 300:
        new = _token_request({"grant_type": "refresh_token",
                              "refresh_token": tokens["refresh_token"]})
        new["realm_id"] = tokens["realm_id"]
        tokens = _save(new)  # the response carries the NEW refresh token: keep it
    return tokens["access_token"], tokens["realm_id"]

With several workers, serialize refreshes (a lock or a single token service); a worker that refreshes with an already-replaced token gets invalid_grant. On invalid_grant, send the customer through the authorization flow again.

Step 2: API client

# qbo_client.py
import requests
from qbo_auth import get_valid_token, BASE_URL, MINOR_VERSION

class QBOClient:
    def __init__(self):
        self.token, self.realm_id = get_valid_token()
        self.base = f"{BASE_URL}/v3/company/{self.realm_id}"
        self.headers = {"Authorization": f"Bearer {self.token}",
                        "Accept": "application/json", "Content-Type": "application/json"}

    def _send(self, method, path, **kw):
        params = {**kw.pop("params", {}), "minorversion": MINOR_VERSION}
        r = requests.request(method, f"{self.base}/{path}", headers=self.headers,
                             params=params, timeout=120, **kw)
        r.raise_for_status()  # 429: wait 60 s and retry; 400 bodies list Fault.Error[].Detail
        ret
Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

  • _scores.json

FAQ

Что делает скилл quickbooks-online?

Integrate with the QuickBooks Online API via OAuth2 to manage invoices, bills, expenses, customers, vendors, and pull financial reports. Use when: connecting SaaS apps to QuickBooks, automating financial data pipelines, syncing transactions, or building accounting integrations for small business clients.

Как установить скилл quickbooks-online?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл quickbooks-online запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить quickbooks-online с