Platform Features

Single Sign-On (SSO)

Use ModVC as an identity provider. Your users can log into your website without creating a new password.

Step 1: Redirect to ModVC

Send the user to the following URL. You must include response_type=code to trigger the SSO flow instead of the bot-join flow.

GET https://modvc.org/app/oauth2/authorize
?client_id=YOUR_CLIENT_ID
&response_type=code
&redirect_uri=https://your-site.com/callback

Step 2: Exchange the Code

When the user approves the login, ModVC redirects them to your redirect_uri with a code parameter. Extract it and send it to our token endpoint from your backend:

POST /api/oauth2
Content-Type: application/json

{ "action": "token", "client_id": "YOUR_CLIENT_ID", "client_secret": "YOUR_CLIENT_SECRET", "code": "m_code.123456..." }

Step 3: Fetch the User

Use the access token you received to fetch the user's profile data.

GET /api/oauth2
Authorization: Bearer m_acc.123456...

This returns a JSON object containing the user's id, username, and avatar.