Svrf API Docs

Authenticate

authenticate()

Authenticates apiKey with the Svrf API using the Authenticate Endpoint.

If an apiKey parameter is not provided, this method will use the SVRF_API_KEY value in the project plist. If an apiKey parameter is set, it will be used over a plist value.

Once authenticated, the SvrfSDK will automatically add authentication tokens to request headers and will fetch a new token if it has expired.

Declaration

func authenticate(apiKey: String? = nil,
onSuccess success: (() -> Void)? = nil,
onFailure failure: Optional<(_ error: SvrfError) -> Void> = nil)

Parameters

ParameterDescription
apiKeySvrf API Key.
successSuccess closure.
failureError closure.
-- errorA SvrfError.