आधिकारिक SDK

पांच सबसे मांगी गई भाषाओं के लिए REST API पर Typed clients। हर एक bearer-token auth, 429 और 5xx पर exponential-backoff retry, और X-Abundera-Signature header के HMAC-SHA256 verification के लिए verifyWebhookSignature helper के साथ आता है। MIT-licensed।

सत्य का स्रोत: /docs/openapi.json · Issues: support@abundera.ai

TS

TypeScript / Node

@abundera/qr-pro

Node 18+। Zero runtime dependencies। ESM और CJS builds।

Install

npm install @abundera/qr-pro

Code बनाएं

import { AbunderaQRProClient } from "@abundera/qr-pro";

const client = new AbunderaQRProClient({
  apiKey: process.env.ABUNDERA_API_KEY!,
});

const code = await client.createCode({
  destination_url: "https://example.com/launch",
  label: "Spring launch poster",
});

console.log(code.short_url);

Webhook verify करें

import { verifyWebhookSignature } from "@abundera/qr-pro";

verifyWebhookSignature({
  signature: req.headers["x-abundera-signature"],
  body: rawBody,
  secret: process.env.ABUNDERA_WEBHOOK_SECRET!,
});
// throws on bad signature / skew, safe to parse body after this line

GitHub पर Source →

Py

Python

abundera-qr-pro

Python 3.9+। Single dependency (httpx)। Sync और async clients।

Install

pip install abundera-qr-pro

Code बनाएं

from abundera_qr_pro import Client

with Client(api_key="abnd_qrpro_...") as c:
    code = c.create_code(
        destination_url="https://example.com/launch",
        label="Spring launch poster",
    )
    print(code.short_url)

Webhook verify करें

from abundera_qr_pro import verify_webhook_signature
from abundera_qr_pro.webhook import WebhookVerificationError

try:
    verify_webhook_signature(
        signature=request.headers["X-Abundera-Signature"],
        body=request.body,
        secret=os.environ["ABUNDERA_WEBHOOK_SECRET"],
    )
except WebhookVerificationError:
    return "", 400

GitHub पर Source →

Go

Go

github.com/abundera/qr-pro-go

Go 1.21+। केवल Standard library। Context-aware throughout।

Install

go get github.com/abundera/qr-pro-go

Code बनाएं

import qrpro "github.com/abundera/qr-pro-go"

c, _ := qrpro.New(os.Getenv("ABUNDERA_API_KEY"))
ctx := context.Background()

code, err := c.CreateCode(ctx, qrpro.CodeCreate{
    DestinationURL: "https://example.com/launch",
    Label:          "Spring launch poster",
})
if err != nil { log.Fatal(err) }
fmt.Println(code.ShortURL)

Webhook verify करें

if err := qrpro.VerifyWebhookSignature(
    r.Header.Get("X-Abundera-Signature"),
    body,
    os.Getenv("ABUNDERA_WEBHOOK_SECRET"),
    0, // default 300s tolerance
); err != nil {
    http.Error(w, "bad signature", http.StatusBadRequest)
    return
}

GitHub पर Source →

Rb

Ruby

abundera-qr-pro

Ruby 3.0+। Faraday पर built। Rails initialisers के साथ अच्छी तरह काम करता है।

Install

gem install abundera-qr-pro
# या Gemfile में
gem "abundera-qr-pro"

Code बनाएं

require "abundera/qr_pro"

client = Abundera::QRPro::Client.new(api_key: ENV.fetch("ABUNDERA_API_KEY"))

code = client.create_code(
  destination_url: "https://example.com/launch",
  label: "Spring launch poster",
)

puts code.short_url

Webhook verify करें

require "abundera/qr_pro/webhook"

begin
  Abundera::QRPro::Webhook.verify!(
    signature: request.headers["X-Abundera-Signature"],
    body: request.raw_post,
    secret: ENV.fetch("ABUNDERA_WEBHOOK_SECRET"),
  )
rescue Abundera::QRPro::Webhook::InvalidSignature
  head :bad_request
end

GitHub पर Source →

PHP

PHP

abundera/qr-pro

PHP 8.1+। किसी भी PSR-18 HTTP client के साथ काम करता है (default Guzzle)। Laravel और Symfony service providers उसी package में ship।

Install

composer require abundera/qr-pro

Code बनाएं

use Abundera\QrPro\Client;

$client = new Client(apiKey: getenv('ABUNDERA_API_KEY'));

$code = $client->createCode(
    destinationUrl: 'https://example.com/launch',
    label: 'Spring launch poster',
);

echo $code->shortUrl;

Webhook verify करें

use Abundera\QrPro\Webhook;
use Abundera\QrPro\WebhookException;

try {
    Webhook::verify(
        signature: $_SERVER['HTTP_X_ABUNDERA_SIGNATURE'] ?? '',
        body: file_get_contents('php://input'),
        secret: getenv('ABUNDERA_WEBHOOK_SECRET'),
    );
} catch (WebhookException $e) {
    http_response_code(400);
    exit;
}

GitHub पर Source →

हर SDK में क्या शामिल है

  • Codeslist, get, create, update, delete, slug check, import।
  • Analyticsfrom/to date filters के साथ JSON और CSV exports।
  • Groupslist, create, delete, codes assign करें।
  • Webhookslist, create (secret के साथ), delete, plus signature-verify helper।
  • User/me, account export।

Admin, Stripe-webhook और infra endpoints जानबूझकर SDKs के scope से बाहर हैं — वे केवल service-to-service हैं। Endpoints की पूरी सूची OpenAPI 3.1 spec में है।

Postman collection

Postman या Insomnia में one-click import: /docs/postman.json (हर deploy पर OpenAPI spec से regenerated)। हर request bearer-token auth header template के साथ pre-configured है — collection level पर एक बार API key set करें और हर endpoint उसे inherit करता है।

Raw OpenAPI prefer करते हैं? Postman OpenAPI 3.1 को natively support करता है: File → Import → Link, फिर https://pro.qr.abundera.ai/docs/openapi.json paste करें।

Versioning policy

SDKs SemVer follow करते हैं और API से independently versioned हैं। SDK bugfix (0.1.0 → 0.1.1) API version नहीं बदलता। Additive API change (नया endpoint, नया optional field) SDK major bump force नहीं करता।

  • SDK patch (0.1.x) — bugfix, docs, कोई public-API change नहीं। Auto-update के लिए safe।
  • SDK minor (0.x.0) — नए API endpoints cover करने के लिए नए methods, या ergonomic additions। Backwards compatible।
  • SDK major (1.0.0 → 2.0.0) — rename, removal, type-shape change। केवल जब API major करे, या जब एक long-standing SDK ergonomic bug fix करना हो जो minor में ship नहीं हो सकता।

API versioning। URL prefix major version है। आज: /api/... (v1)। Breaking change /api/v2/... के रूप में ships, v1 को कम से कम 12 months alive रखा जाता है और पूरे deprecation window में Deprecation + Sunset response headers के साथ। “breaking” की पूरी definition /docs/changelog/ पर।

Support window। Current major पर latest minor को security fixes मिलते हैं। Older majors को paying Pro customers के अनुरोध पर security patches मिलते हैं।

Example apps

Code creation, destination update, analytics read और webhook signature verification दिखाने वाले minimal runnable apps:

  • node-express — TypeScript + Express, webhook endpoint with replay protection।
  • fastapi — Python 3.11 + FastAPI, signature verification helper wired in।
  • gin — Go 1.21 + Gin, idiomatic handler pattern।
  • rails — Rails 7 + Sidekiq, webhook handler as a job।
  • laravel — Laravel 11, signed-route webhook controller।

हर example mocked API के खिलाफ CI-tested है। Clone करें, ABUNDERA_API_KEY और ABUNDERA_WEBHOOK_SECRET set करें, run करें।

आपकी भाषा नहीं दिखती?

OpenAPI 3.1 spec सत्य का स्रोत है। openapi-generator से किसी भी भाषा में client generate करें, या खुद thin wrapper लिखें — API छोटा है (छह core resources, bearer-token auth)। यदि आप किसी ऐसी भाषा के लिए official SDK चाहते हैं जो हम cover नहीं करते, support@abundera.ai email करें।