Install
Add the SDK to your backend and construct a client. Node.js, Python, Go and PHP install from their registries today; C# and Java are written but not published yet.
Add the package
go get github.com/u2secured/u2auth-go
# Go records it in go.mod; commit that and go.sum.Two of these packages are not published yet
Node.js, Python, Go and PHP install from npm, PyPI, the Go module proxy and Packagist today. The C# and Java packages are written and tested, but they are not on NuGet or Maven Central, so those two commands will not resolve — they are shown because they are the right commands once each package lands, not because they work today. Until then, call the REST endpoints directly or vendor the SDK source. Each caveat comes down as its package is published.
Python: pip, not pipx
pipx installs an application into its own virtualenv and exposes its command-line scripts. This package is a library with no console scripts, so a pipx install leaves nothing your backend can import. Use pip inside a virtualenv, or uv/poetry if you want a lock file. Reach for pipx only for standalone CLI tools.
Construct a client
Do this once at startup and reuse the client — each one holds a connection pool. Point base_url at your own host only if you are self-hosting.
import u2auth "github.com/u2secured/u2auth-go"
// Once at startup.
client := u2auth.NewClient("rka_your_api_key", nil)Keep your API key server-side
An rka_ key can enrol users, remove enrolments and approve logins. Never ship it in a browser bundle, a mobile app, or anything else a user can read.
Next: send your first push
With the client constructed, pair a user and call requestPush. Enrolling users covers the pairing step, and Push approvals walks through requesting one and waiting for the answer.