Skip to main content
vyget() reads the result of a verification. In redirect mode it parses the parameters the hosted flow appended to your return URL. In the iframe modes it returns the last completed result, the same one onComplete received.

What it does

When a user returns from a redirect flow, the URL looks like this:
vyget() reads the two reserved parameters and returns them as a typed object:
  • vyt is the confirmation token. This is the proof you exchange on your backend for the authoritative result.
  • vyc is the client-side verdict hint: 1 (passed) or 0 (failed).

How it works

vyget() is synchronous and makes no network calls. It checks the URL first; if there are no vy parameters and an embedded flow completed earlier on this page, it returns that result instead. It is safe to call anywhere, on every page load. If there is nothing to read you get the empty result rather than an error.

Use it on page load

Call vyget() when your page mounts. A token means the user just came back from verifying. Hand it to your backend to confirm, then clean the parameters off the URL so a refresh can’t replay them.
Confirm each token exactly once and guard against duplicate calls. Development tooling like React StrictMode runs effects twice, and a second confirmation of a token you already accepted and locked reads as a rejection.
verified is a convenience for your UI. Anyone can edit a URL. For anything that matters, send the token to your backend and confirm it with your secret key.
No result to read? Start a verification with vycheck().