Connected Accounts
Get an authorization link
Changed onCreates a one-time authorization link for connecting or re-authorizing a user's account on one connection, creating the connected account first if it doesn't exist. The link takes the user to the app's consent screen, or to a form for their credentials. Returns the link and when it expires, 5 minutes after you create it.
post/api/v1/connected_accounts/magic_link
Request
- Base URLhttps://$SCALEKIT_ENVIRONMENT_URL
- AuthOAuth 2Client credentialsToken URLhttps://$SCALEKIT_ENVIRONMENT_URL/oauth/token
- TypeScriptA function with typed inputs. Its response is checked against the schema.
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
Authorization link created, with its expiry time
Example response
{
"expiry": "2024-03-20T15:04:05Z",
"link": "https://notion.com/oauth/authorize?client_id=..."
}Changes
- info
added the non-success response with the status
- info