Skip to main content
otps.email.discovery.authenticate wraps the Authenticate Discovery OTP endpoint, which validates the OTP code passed in. Use this method to authenticate a discovery Email OTP. If this method succeeds, the token will be stored . After authenticating a discovery OTP, you’ll receive an Intermediate Session that contains a list of discovered organizations. The user can then select an organization and exchange the intermediate session for a full session using the exchange intermediate session method.

Parameters

string
required
The code to authenticate.
string
required
The email address of the Member.

Response

string
The email address that was authenticated.
object[]
An array of discovered Organizations that the Member can authenticate into.
string
The intermediate session token that can be exchanged for a full session.
string
Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we may ask for this value to help identify a specific API call when helping you debug an issue.
number
The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors.