Authenticates the OTP and returns an intermediate session token. Intermediate session tokens can be used for various Discovery login flows and are valid for 10 minutes.
Authenticate Discovery One-Time Passcode (OTP)
POSThttps://test.stytch.com/v1/b2b/otps/email/discovery/authenticate
Body parameters
email_address* string
code* string
Response fields
request_id string
status_code int
intermediate_session_token string
email_address string
discovered_organizations array
curl --request POST \
--url https://test.stytch.com/v1/b2b/otps/email/discovery/authenticate \
-u 'PROJECT_ID:SECRET' \
-H 'Content-Type: application/json' \
-d '{
"email_address": "sandbox@stytch.com",
"code": "123456"
}'
RESPONSE
200
{
"request_id": "request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141",
"status_code": 200,
"intermediate_session_token": "SeiGwdj5lKkrEVgcEY3QNJXt6srxS3IK2Nwkar6mXD4=",
"email_address": "sandbox@stytch.com",
"discovered_organizations": [{...}, {...}]
}