Check out the SDK Authentication guide on the available SDK authentication schemes, and how to authenticate with the Vital Mobile SDK.

Accessing Vital API

You can access Vital API through VitalClient with typed request methods and response models.

Typed API access is not yet available in React Native.

You can obtain an URL to the Vital Link Widget through VitalClient.linkWidgetUrl. Note that the URL contains a short-lived token with 10-minute expiry.

For the redirectUrl, you should set it to a URL with a custom URL scheme which your app would register to handle.

Core SDK Status

You can inspect the status of the Core SDK for troubleshooting, as well as for your own business logic. For example, you may reconcile your user session and the Vital SDK sign-in based on the Core SDK status.

The SDK normally reports one of the following status combinations:

CombinationsAuth SchemeRemarks
EmptyN/AThe SDK has neither been configured nor an active sign-in.
ConfiguredAPI KeyThe SDK has been configured, but does not have an active sign-in.
Configured, SignedIn & UseApiKeyAPI KeyThe active sign-in was done by setting an API Key and a target Vital User ID.
Configured, SignedIn & UseSignInTokenVital Sign-In TokenThe active sign-in was done by consuming a Vital Sign-In Token.

Get the current status

Observe status changes over time

Get Current Vital User ID

Aside from the Core SDK Status, you can also query the Vital User ID of the signed-in user:

Reset the SDK (Sign Out)

Refer to the Sign Out section in the SDK Authentication guide.