# OTP Provisioning URI Builder

> OTP Provisioning URI Builder is a paid API for AI agents from otp.openverbs.com, paid per call via x402, $0.004/call, status unknown (last checked 2026-09-15).

Builds an otpauth:// URI (used in authenticator QR codes) for a given TOTP or HOTP secret, with label, issuer, algorithm, digits, and period/counter.

## Facts

- Endpoint: POST https://otp.openverbs.com/v1/uri
- Price: $0.004/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/otp-provisioning-uri-builder-ea807bce
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_lJjMrFDEkNxhPKEcSaFl6

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability otp-provisioning-uri-builder-ea807bce -d '<json body>'
```

Example prompt: Build an otpauth:// provisioning URI for a TOTP secret — the label is 'Acme:alice@acme.com', the issuer is 'Acme', the base32 secret is 'JBSWY3DPEHPK3PXP', use SHA1, 6 digits, and a 30-second period.

## When to prefer this

Use this endpoint when you need to construct a standards-compliant otpauth:// URI for display as a QR code or deep link during 2FA/MFA enrollment. It is the right choice when you already have a base32 secret and need to format it correctly for authenticator apps (Google Authenticator, Authy, etc.) without implementing the URI formatting logic yourself. Prefer it over sibling endpoints when you need the URI string specifically, not a generated code or verification result.

## Known failure modes

- Invalid base32 secret returns a 400 error
- Missing required fields (label or secret) returns validation error
- Counter missing for HOTP type returns error
- Algorithm value outside SHA1/SHA256/SHA512 enum rejected
- Digits outside 6-10 range rejected
- Period outside 1-86400 range rejected
- Payment not completed returns 402 Payment Required

## How this service works

Build an otpauth:// provisioning URI (the string encoded in authenticator QR codes) for a totp or hotp secret. Includes label, issuer, algorithm, digits and period (totp) or counter (hotp). The secret must be valid base32.

## Output

Returns an otpauth:// URI string (e.g. otpauth://totp/Example%3Aalice%40example.com?secret=JBSWY3D...&issuer=Example&algorithm=SHA1&digits=6&period=30) ready to be encoded into a QR code or used by an authenticator app.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "required": [
      "label",
      "secret"
     ],
     "properties": {
      "type": {
       "enum": [
        "totp",
        "hotp"
       ],
       "type": "string",
       "description": "OTP type. Default totp."
      },
      "label": {
       "type": "string",
       "maxLength": 128,
       "minLength": 1,
       "description": "Account label, e.g. 'Example:alice@example.com'."
      },
      "digits": {
       "type": "integer",
       "maximum": 10,
       "minimum": 6,
       "description": "Number of code digits. Default 6."
      },
      "issuer": {
       "type": "string",
       "maxLength": 128,
       "minLength": 1,
       "description": "Issuer/provider name."
      },
      "period": {
       "type": "integer",
       "maximum": 86400,
       "minimum": 1,
       "description": "Time step (totp only). Default 30."
      },
      "secret": {
       "type": "string",
       "maxLength": 1024,
       "minLength": 1,
       "description": "Base32-encoded shared secret."
      },
      "counter": {
       "type": "integer",
       "minimum": 0,
       "description": "Initial counter (required for hotp)."
      },
      "algorithm": {
       "enum": [
        "SHA1",
        "SHA256",
        "SHA512"
       ],
       "type": "string",
       "description": "HMAC algorithm. Default SHA1."
      }
     },
     "additionalProperties": false
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/otp-provisioning-uri-builder-ea807bce/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from otp.openverbs.com](https://www.zero.xyz/host/otp.openverbs.com/llms.txt)
