---
schema_version: "1"
id: c135c63e4425cb471748bac370851a2932640ca2b665dccdcea7f79004b92a5e
title: TwoFactorTempCode
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/object_reference/sforce_api_objects_twofactortempcode.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_twofactortempcode.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 07693032b5b616c9a10ff1d3891eb25e8bd305e2e96761d41da9ac6fa41cad36
description: Stores information about a user’s temporary verification code for confirming their identity when logging in. This object is available in API version 37.0 and later.
---
# TwoFactorTempCode

Stores information about a user’s temporary verification code for confirming their identity when logging in. This object is available in API version 37.0 and later.

## Supported Calls

describeSObjects(), query(), retrieve()

## Special Access Rules

You need the Manage Multi-Factor Authentication in API permission to access this object. (Note that multi-factor authentication was formerly called two-factor authentication.)

## Fields

| Field Name | Details |
| --- | --- |
| Expiration | 
Type

dateTime

Properties

Filter, Sort

Description

The date and time when the temporary verification code expires. The code expires in 1 to 24 hours after it’s generated. Salesforce admins and non-admin users with the Manage Multi-Factor Authentication in User Interface permission set the expiration time when generating the code.



 |
| Identifier | 

Type

string

Properties

Filter, Group, Sort

Description

The unique identifier for the temporary code. This is a required field that can take any value.



 |
| TempCode | 

Type

encryptedstring

Description

A request for this value always returns null.



 |
| UserId | 

Type

reference

Properties

Filter, Group, Sort

Description

The ID for the user who’s associated with the temporary verification code.



 |