Skip to content

Credential methods: verify

The Credential Verbs verify as typed SDK methods, with inputs, result, refusals and an example.

Reference for Credential, one group of Credential methods.

Credential.verify

Verify confirms a Credential with the authority that issued it and records when it expires. Verb page.

TypeScript
interface CredentialVerbs {
  verify(input: CredentialVerifyInput, options?: SB.CallOptions): SB.Call<Credential>
}

Emits Credential.verified.

Inputs

InputTypeRequiredDescription
credentialCredentialrequiredThe Credential to check.

Returns

OutputTypeRequiredDescription
credentialCredentialrequiredThe verified Credential.

Refuses when

CheckErrorFixThen call
The input does not match the schema of the operation.invalid-inputRead the schema of the operation, then send every required field with the right type.None.
The key is valid, but its scopes do not allow this operation.forbiddenUse a key whose scopes cover the operation, or ask an owner of the namespace to grant them.None.
The record is not in a state that allows this Verb, so the call is refused.refusedRead the record, run the Verb that moves it to an allowed state, then retry.None.

Example

TypeScript
import { $ } from 'startup-builder'

const credential = await $.Credential.verify({ credential: 'credential_Abb9zatRR1' })