Send a discovery magic link to an email address. The magic link is valid for 60 minutes.
Send Discovery Email
POST
https://test.stytch.com/v1/b2b/magic_links/email/discovery/sendBody parameters
email_address* string
discovery_redirect_url string
pkce_code_challenge string
login_template_id string
locale string
discovery_expiration_minutes int
Response fields
request_id string
status_code int
const stytch = require('stytch');
const client = new stytch.B2BClient({
project_id: 'PROJECT_ID',
secret: 'SECRET',
});
const params = {
email_address: "sandbox@stytch.com",
};
client.magicLinks.email.discovery.send(params)
.then(resp => { console.log(resp) })
.catch(err => { console.log(err) });
RESPONSE
200
{
"request_id": "request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141",
"status_code": 200
}