MYSA
Login
Checking...

Documentation

Integrate Mysa in under 15 minutes

Follow this quick guide to embed the widget and connect to the core API endpoints.

1. Add the widget script

Include the widget bundle where you want customers to sign in.

<script src="https://cdn.mysa.com/widget.js"></script>
<div id="mysa-login"></div>
<script>
  Mysa.mount("#mysa-login", {
    projectId: "your_project_id",
    redirectUrl: "https://app.yourproduct.com"
  });
</script>

2. Configure your API keys

Store your server-side key and call the REST API from your backend.

export const client = new Mysa({
  apiKey: process.env.MYSA_SECRET_KEY,
});

const session = await client.sessions.create({
  userId: "user_123",
  redirectUrl: "https://app.yourproduct.com/callback"
});

Core endpoints

REST API essentials

Everything you need to power auth, lifecycle events, and access policies.

Authentication

  • POST /v1/sessions
  • GET /v1/sessions/{sessionId}
  • POST /v1/mfa/challenge
  • POST /v1/mfa/verify

User management

  • POST /v1/users
  • PATCH /v1/users/{userId}
  • GET /v1/audit/events
  • POST /v1/webhooks