PGB Pass for developers
Phone approvals for your app

Let your users approve sign-ins with one tap.

Add PGB Pass to your own login or sensitive actions. When someone signs in, their phone asks "Is this you?" — they tap the matching number, and your server gets the signed answer.

No PGB account for your users Device-bound signing keys 6-digit offline fallback
POST /v1/auth
user_8421 · Berlin, DE
Match 42
A Acme

Are you signing in?

Chrome on Windows · Berlin, DE · Match 42
A Acme
Approved

Signed response sent to your server.

Signed webhook
X-PGB-Signature · HMAC-SHA256
pending
Interactive demo — tap a number above
Workflow

How it works

Three server calls. Your user only installs the free PGB Pass app and scans one QR code.

01

Link a phone once

Request an enrollment QR code for your user ID. They scan it in PGB Pass (up to 5 phones per user).

02

Ask for approval

On sign-in, payout, or admin action, send context + a match number. Requests stay valid for 2 minutes.

03

Get the signed answer

Wait on a single long-poll call or receive a signed webhook: approved, denied, or expired.

Security architecture

Built-in security, zero mobile code

Strong push MFA out of the box — no mobile app to build, ship, or maintain.

42

Number matching

Stops accidental taps and push-fatigue attacks by requiring the number shown on screen.

Hardware-bound keys

Each linked phone generates its own signing key. Approvals cannot be replayed from another device.

Offline 6-digit codes

No signal or notifications off? PGB Pass generates a 6-digit fallback code you verify in one call.

Device posture & fraud signals

Require screen lock or biometrics, display login context, and catch reported_fraud denials immediately.

Quickstart

Quickstart in 5 calls

Plain HTTPS and JSON from your server. Keep your pgbpk_… key secret on the backend.

Create an app in PGB Console → PGB Pass → For developers to get your pgbpk_… API key and pgbws_… webhook secret (up to 10 apps per account).

Verify your API key
curl https://pass.pgbhub.com/v1/app \
  -H "Authorization: Bearer $PGB_PASS_KEY"

Pass your own user ID (1–128 chars) and render the returned qr_svg in your security settings. Links expire after 10 minutes. Check linked phones anytime with GET /v1/users/user_8421.

Enroll a user device
curl -X POST https://pass.pgbhub.com/v1/users/user_8421/enroll \
  -H "Authorization: Bearer $PGB_PASS_KEY" -H "Content-Type: application/json" \
  -d '{"display_name": "[email protected]"}'

# → { "success": true, "link": "https://pass.pgbhub.com/link?token=pgbpl_…",
#     "qr_svg": "<svg …>", "expires_in": 600 }

After checking the password, create an approval challenge and display match_number on your login screen.

Create approval challenge
curl -X POST https://pass.pgbhub.com/v1/auth \
  -H "Authorization: Bearer $PGB_PASS_KEY" -H "Content-Type: application/json" \
  -d '{"user_id": "user_8421",
       "context": {"ip": "203.0.113.7", "location": "Berlin, DE",
                   "browser": "Chrome on Windows", "action": "Sign in to Acme"}}'

# → { "success": true, "id": "9f3c…", "status": "pending",
#     "expires_in": 120, "match_number": 42 }

Hold the request open for up to 30 seconds while pending, or listen for the signed webhook. Sign the user in only on approved.

Poll for result
curl "https://pass.pgbhub.com/v1/auth/9f3c…?wait=30" \
  -H "Authorization: Bearer $PGB_PASS_KEY"

# → { "success": true, "status": "approved" }
# → { "success": true, "status": "denied", "reason": "reported_fraud" }

Offer a "Use a 6-digit code instead" option for offline phones and verify it in one call.

Verify offline code
curl -X POST https://pass.pgbhub.com/v1/verify-code \
  -H "Authorization: Bearer $PGB_PASS_KEY" -H "Content-Type: application/json" \
  -d '{"user_id": "user_8421", "code": "493027"}'

# → { "success": true, "valid": true, "link_id": "…" }
API & Webhooks

Developer reference

Base URL https://pass.pgbhub.com · Auth header Authorization: Bearer pgbpk_…

Endpoints, webhooks & rate limits Click to expand full reference
EndpointPurpose
GET/v1/appApp metadata, device policy, webhook health, and monthly usage.
POST/v1/users/{user_id}/enrollOne-time link & qr_svg. Optional {"display_name"} shown in PGB Pass.
GET/v1/users/{user_id}List linked phones (link_id, device_name, platform). 404 USER_NOT_LINKED if none.
DELETE/v1/users/{user_id}Unlink all phones for a user.
DELETE/v1/users/{user_id}/devices/{link_id}Unlink a single phone.
POST/v1/authCreate approval request with user_id, context, and number_matching.
GET/v1/auth/{id}Check status (?wait= up to 30s). Denials include reason.
POST/v1/verify-codeVerify 6-digit fallback code (pauses after 5 fails in 10m).

Webhook events

Signed POST requests (3 retries, 5s timeout, HTTPS only). Confirm with GET /v1/auth/{id} for sensitive actions.

  • auth.approved — user approved
  • auth.denied — denied (user_denied, reported_fraud, wrong_number, device_check_failed)
  • auth.expired — timed out
  • link.removed — device unlinked

Verify X-PGB-Signature

Header t=<unix>,v1=<hex> is HMAC-SHA256 of "<t>." + raw_body using pgbws_…. Reject timestamps older than 5 min.

# Python
import hashlib, hmac, time
def valid(hdr: str, body: bytes, secret: str) -> bool:
    p = dict(x.split("=", 1) for x in hdr.split(","))
    if abs(time.time() - int(p["t"])) > 300: return False
    exp = hmac.new(secret.encode(), f"{p['t']}.".encode() + body, hashlib.sha256).hexdigest()
    return hmac.compare_digest(exp, p["v1"])

Standard error codes

400 / 401INVALID_REQUEST, INVALID_USER_ID, INVALID_API_KEY
402 / 404PAYMENT_REQUIRED, USER_NOT_LINKED, NOT_FOUND
409 / 429TOO_MANY_LINKS, TOO_MANY_PENDING, RATE_LIMITED
500SERVER_ERROR (includes support reference)

Default rate limits

API calls / app600 / min
Approval requests120 / min · 10 / 10m per user
Pending cap3 unanswered per user
Enrollments60 / min · 10 / hr per user
Pricing

Simple, usage-based pricing

Pay only for monthly active users who receive an approval or verify a code.

Pay as you grow

Beyond free

$0.50

per extra active user / month from your PGB wallet, with a 7-day grace period.

End-user experience

What your users need

  • Free PGB Pass app on iOS or Android
  • No PGB account or password required
  • Your branding (app name & logo) in every prompt

Ready to add one-tap approvals?

Create your app in PGB Console and get your API key in seconds.