Authenticates the Discovery Magic Link token and exchanges it for an Intermediate Session Token. Intermediate Session Tokens can be used for various Discovery login flows and are valid for 10 minutes.
Authenticate Discovery Magic Link
POSThttps://test.stytch.com/v1/b2b/magic_links/discovery/authenticate
Body parameters
discovery_magic_links_token* string
pkce_code_verifier 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/magic_links/discovery/authenticate \
-u 'PROJECT_ID:SECRET' \
-H 'Content-Type: application/json' \
-d '{
"discovery_magic_links_token": "SeiGwdj5lKkrEVgcEY3QNJXt6srxS3IK2Nwkar6mXD4="
}'
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": [{...}, {...}]
}