/SDKs & libraries

API docs

SDKs & libraries

OTPRelay is a plain REST API, so you can send and verify one-time passcodes from any language today over HTTP - official SDKs are on the way.

There's nothing to install to start using OTPRelay. Every endpoint is standard REST: JSON request bodies, JSON snake_case responses, and a bearer token in the Authorization header. Any HTTP client in any language can call it - see Authentication for how keys work.

We're building official, idiomatic SDKs for the most common languages so you can skip the boilerplate. Until they ship, the REST API is the only supported interface and every example throughout these docs is cURL / REST.

Availability

The table below reflects current status honestly. Only HTTP / cURL is available today; the language packages are planned and the names may change before release.

LanguagePackageStatus
Node.jsotprelayPlanned - coming soon
PythonotprelayPlanned - coming soon
PHPotprelay-phpPlanned - coming soon
Gootprelay-goPlanned - coming soon
HTTP / cURL-Available now

Installing (planned)

The Node, Python, PHP and Go SDKs are coming soon. The install commands below are shown for reference only - the packages are not yet published, so they will not resolve today. The only working example on this page is the cURL / REST call below.

# Planned - coming soon, not yet publishednpm install otprelay

Using the API directly

Until the SDKs land, call the REST API directly. The request below creates an SMS verification - only to is required, and it works today against the live base URL https://api.otprelay.io/v1.

bash
curl https://api.otprelay.io/v1/verifications \  -H "Authorization: Bearer sk_live_••••" \  -H "Content-Type: application/json" \  -d '{    "to": "+966512345678"  }'

That's the whole pattern: one call to send a verification, one call to check it. The Quickstart walks through a complete send-and-verify flow from scratch, and the API reference lists every endpoint, parameter and field.

SDKs aren't released yet

No official SDK has shipped yet. If you'd like early access to a library for your language, get in touch- we're prioritizing based on demand. Package names and language coverage are still being decided.