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:
vytis the confirmation token. This is the proof you exchange on your backend for the authoritative result.vycis the client-side verdict hint:1(passed) or0(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
Callvyget() 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.
No result to read? Start a verification with
vycheck().