Download OpenAPI specification:Download
Login users using one-time login methods like magic links or OTPs. This implements a backend-to-backend integration for authentication.
Send a magic link by email to a user. Upon clicking the email link, the User Agent will be redirected to the requested redirect URI with a code (passed in the code
query parameter). This code can be used to complete the authentication in the subsequent request.
Backend auth initialized successfully.
{- "email": "name@example.com",
- "email_content": {
- "subject": "string",
- "primaryColor": "#6981FF",
- "base64logo": "string",
- "headerText": "string",
- "bodyText": "string",
- "linkText": "string",
- "infoText": "string",
- "footerText": "If you didn't request this email, you can safely ignore it.",
- "senderName": "string"
}, - "state": "string",
- "email_expiration": 0,
- "channel": "email",
- "client_attributes": {
- "user_agent": "string",
- "ip_address": "string"
}
}
{- "message": "Email sent successfully"
}
Authenticate a user using the email magic link you sent them. Upon clicking the email link, a code was returned to your redirect URI as the code
query parameter. This API validates this code and returns user tokens.
resource | string Resource URI the authentication request is attempting to access, which is reflected in the audience ( |
object Used to request additional claims in the ID token, such as roles, permissions, and other user profile data. The structure is per the OIDC Standard. For supported claims and how to request custom claims, see the ID Token Reference. | |
org_id | string Organization ID, used for member login in B2B scenarios |
object Client attributes | |
session_id | string Used to associate the authentication with an existing session (such as for MFA). If unspecified, a new session is created and the session ID is returned. |
code required | string The code received from the magic link |
Returns user tokens
{- "resource": "string",
- "claims": {
- "id_token": {
- "roles": null
}
}, - "org_id": "string",
- "client_attributes": {
- "user_agent": "string",
- "ip_address": "string"
}, - "session_id": "string",
- "code": "string"
}
{- "access_token": "string",
- "id_token": "string",
- "refresh_token": "string",
- "token_type": "string",
- "expires_in": 3600,
- "session_id": "string"
}
Send a one-time passcode to a user by email or SMS.
Backend auth initialized successfully.
{- "channel": "sms",
- "identifier_type": "email",
- "identifier": "string",
- "email_content": {
- "subject": "string",
- "primaryColor": "#6981FF",
- "base64logo": "string",
- "headerText": "string",
- "bodyText": "string",
- "linkText": "string",
- "infoText": "string",
- "footerText": "If you didn't request this email, you can safely ignore it.",
- "senderName": "string"
}, - "custom_sms_input": {
- "custom_message": "string",
- "sender_id": "string"
}, - "approval_data": {
- "transaction_id": "eFII2y40uB9hQ98nXt3tc1IHkRt8GrRZiqZuRn_59wT",
- "sum": "200"
}, - "custom_email": "string",
- "custom_phone_number": "string",
- "client_attributes": {
- "user_agent": "string",
- "ip_address": "string"
}
}
{- "message": "OTP sent",
- "approval_data": {
- "transaction_id": "eFII2y40uB9hQ98nXt3tc1IHkRt8GrRZiqZuRn_59wT",
- "sum": "200"
}, - "code": "123456"
}
Authenticates a user using a one-time passcode that was sent to them by email or SMS. This API validates the code provided by the user and returns user tokens.
resource | string Resource URI the authentication request is attempting to access, which is reflected in the audience ( |
claims | object Used to request additional claims in the ID token, such as roles, permissions, and other user profile data. The structure is per the OIDC Standard. For supported claims and how to request custom claims, see the ID Token Reference. |
org_id | string Organization ID, used for member login in B2B scenarios |
object Client attributes | |
session_id | string Used to associate the authentication with an existing session (such as for MFA). If unspecified, a new session is created and the session ID is returned. |
passcode required | string OTP to validate |
identifier_type required | string Type of user identifier used for sending the OTP |
identifier required | string User identifier that the OTP was sent to |
Returns user tokens
{- "resource": "string",
- "claims": {
- "id_token": {
- "roles": null
}
}, - "org_id": "string",
- "client_attributes": {
- "user_agent": "string",
- "ip_address": "string"
}, - "session_id": "string",
- "passcode": "string",
- "identifier_type": "email",
- "identifier": "string"
}
{- "access_token": "string",
- "id_token": "string",
- "refresh_token": "string",
- "token_type": "string",
- "expires_in": 3600,
- "session_id": "string"
}