Connected Accounts
Generate authentication magic link
Creates a time-limited magic link for connecting or re-authorizing a third-party account. The link directs users to the OAuth authorization flow for the specified connector. Returns the generated link URL and expiration timestamp. Links typically expire after a short duration for security.
post/api/v1/connected_accounts/magic_link
Request body
Example request
{
"connector": "notion",
"id": "ca_123",
"identifier": "user@example.com",
"organization_id": "org_121312434123312",
"state": "QVNDSUFyY2hhYml0dGVyXzE2ODQ5NzIwNzI0NTY=",
"user_id": "user_121312434123312",
"user_verify_url": "https://app.yourapp.com/user/verify/callback"
}Response
Magic link generated successfully with authorization URL and expiry time
Example response
{
"expiry": "2024-03-20T15:04:05Z",
"link": "https://notion.com/oauth/authorize?client_id=..."
}