Identities

Detokenize identity

Detokenize multiple identity fields with the TypeScript SDK.

POST/identities/{identity_id}/detokenize

Use blnk.Identity.detokenize to detokenize several identity fields.

Call the method

const response = await blnk.Identity.detokenize(
  'idt_3b63c8da-af29-4cc3-ad38-df17d87456e6',
  {
    fields: ['FirstName', 'EmailAddress'],
  },
);
FieldTypeDescription
idstringIdentity ID.
fieldsstring[]PascalCase field names to detokenize. Pass [] for all tokenized fields.

Use the plaintext values

Read response.data.fields for the original values. Handle these values securely and avoid logging them.

Response

{
  "fields": {
    "firstName": "Alice",
    "emailAddress": "alice.smith@example.com"
  }
}
FieldTypeDescription
fieldsRecord<string, string>Original values for the fields you requested.