This page documents the OAuth 2.0 HTTP endpoints implemented by Connextify per RFC 6749, RFC 7636, RFC 7591, and RFC 8414.

1. Discovery metadata

/.well-known/oauth-authorization-server
GET
Returns OAuth 2.0 server capabilities, supported grant types, and endpoint URLs per RFC 8414.
curl https://connextify.com/.well-known/oauth-authorization-server
{
  "issuer": "https://connextify.com",
  "authorization_endpoint": "https://connextify.com/mcp/oauth/authorize",
  "token_endpoint": "https://connextify.com/mcp/oauth/token",
  "revocation_endpoint": "https://connextify.com/mcp/oauth/revoke",
  "registration_endpoint": "https://connextify.com/mcp/oauth/register",
  "scopes_supported": [
    "shorturl:create",
    "shorturl:read",
    "shorturl:update",
    "shorturl:delete",
    "qrcode:create",
    "qrcode:read",
    "analytics:read",
    "domain:read",
    "domain:create",
    "campaigns:read",
    "campaigns:manage",
    "webhook:manage"
  ],
  "response_types_supported": ["code", "token"],
  "grant_types_supported": ["authorization_code", "refresh_token", "client_credentials"],
  "token_endpoint_auth_methods_supported": ["client_secret_post", "client_secret_basic"],
  "code_challenge_methods_supported": ["S256", "plain"]
}

2. Dynamic client registration

/mcp/oauth/register
POST
Register a new third-party OAuth client (RFC 7591) without needing manual developer console approval.

Request body parameters

FieldTypeRequiredDescription
client_namestringYesHuman-readable name shown to users on the consent screen.
redirect_urisstring[]YesAllowed HTTPS redirect URLs (HTTP allowed for localhost).
grant_typesstring[]NoDefaults to ["authorization_code"].
response_typesstring[]NoDefaults to ["code"].
scopestringNoSpace-separated list of scopes your app will request (defaults to "url:read url:create").
client_uristringNoHomepage URL for your application.
policy_uristringNoLink to your Privacy Policy.
tos_uristringNoLink to your Terms of Service.
curl -X POST https://connextify.com/mcp/oauth/register \
  -H "Content-Type: application/json" \
  -d '{
    "client_name": "Analytics Dashboard",
    "redirect_uris": ["https://myapp.com/oauth/callback"],
    "scope": "shorturl:read analytics:read",
    "client_uri": "https://myapp.com",
    "policy_uri": "https://myapp.com/privacy"
  }'
{
  "client_id": "connextify_client_abc123def456",
  "client_secret": "sec_89324098234jklfsd",
  "client_name": "Analytics Dashboard",
  "redirect_uris": ["https://myapp.com/oauth/callback"],
  "grant_types": ["authorization_code", "refresh_token"],
  "response_types": ["code"],
  "scope": "shorturl:read analytics:read",
  "client_id_issued_at": 1773820800,
  "client_secret_expires_at": 0
}
client_secret is only displayed once upon registration. Save it immediately in your secrets manager.

3. Authorization endpoint

/mcp/oauth/authorize
GET
Redirect the user to this page in their browser. Displays the Connextify login (if unauthenticated) and consent dialog.

Query parameters

ParameterTypeRequiredDescription
client_idstringYesYour registered client ID.
redirect_uristringYesMust match one of your registered redirect_uris.
response_typestringYesMust be code.
scopestringYesSpace- or plus-separated list of scopes to request.
statestringYesRandom CSRF verification string generated by your app.
code_challengestringYesBase64URL-encoded SHA-256 hash of your PKCE verifier.
code_challenge_methodstringYesMust be S256.
workspace_idstringNoOptional Personal or Team Workspace owner UID to pre-select on the consent screen (availableWorkspaces returned in consent metadata; defaults to Personal Workspace unless the user chooses a joined workspace where they have mcp_access).

Constructing the URL

function getAuthorizationUrl(clientId, redirectUri, scopes, state, challenge) {
  const url = new URL('https://connextify.com/mcp/oauth/authorize');
  url.searchParams.set('client_id', clientId);
  url.searchParams.set('redirect_uri', redirectUri);
  url.searchParams.set('response_type', 'code');
  url.searchParams.set('scope', scopes.join(' '));
  url.searchParams.set('state', state);
  url.searchParams.set('code_challenge', challenge);
  url.searchParams.set('code_challenge_method', 'S256');
  return url.toString();
}

Callback redirect

When the user clicks Approve, the browser redirects to:
https://myapp.com/oauth/callback?code=AUTH_CODE_HERE&state=random_state_string
If the user clicks Deny, the browser redirects to:
https://myapp.com/oauth/callback?error=access_denied&error_description=User%20denied%20the%20request&state=random_state_string

4. Token exchange endpoint

/mcp/oauth/token
POST
Exchange an authorization code for access and refresh tokens, or refresh an expired access token.

A. Authorization code grant

Form FieldValueNotes
grant_typeauthorization_codeFixed string
codestringAuthorization code received at your callback
client_idstringYour client ID
client_secretstringYour client secret
redirect_uristringMust match the redirect_uri from step 3
code_verifierstringPlain-text random string used to generate code_challenge
curl -X POST https://connextify.com/mcp/oauth/token \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "grant_type=authorization_code" \
  -d "code=AUTH_CODE_HERE" \
  -d "client_id=connextify_client_abc123" \
  -d "client_secret=sec_89324098234jklfsd" \
  -d "redirect_uri=https://myapp.com/oauth/callback" \
  -d "code_verifier=ORIGINAL_VERIFIER_STRING"
Node.js
const params = new URLSearchParams({
  grant_type: 'authorization_code',
  code: authCode,
  client_id: 'connextify_client_abc123',
  client_secret: process.env.CLIENT_SECRET,
  redirect_uri: 'https://myapp.com/oauth/callback',
  code_verifier: sessionStorage.getItem('pkce_code_verifier')
});

const res = await fetch('https://connextify.com/mcp/oauth/token', {
  method: 'POST',
  headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
  body: params
});

const tokens = await res.json();
console.log('Access token:', tokens.access_token);
{
  "access_token": "eyJhbGciOi...",
  "token_type": "Bearer",
  "expires_in": 3600,
  "refresh_token": "cnfy_rt_9f8234jkln",
  "scope": "shorturl:read analytics:read"
}

B. Refresh token grant

Form FieldValue
grant_typerefresh_token
refresh_tokenYour current refresh token
client_idYour client ID
client_secretYour client secret
curl -X POST https://connextify.com/mcp/oauth/token \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "grant_type=refresh_token" \
  -d "refresh_token=cnfy_rt_9f8234jkln" \
  -d "client_id=connextify_client_abc123" \
  -d "client_secret=sec_89324098234jklfsd"
Token Rotation: Each refresh request returns a fresh refresh_token and rotates the previous one (allowing a brief 30-second concurrency grace window for parallel requests; replaying a rotated token after the grace window revokes the entire token family). Overwrite your stored token with the new refresh_token returned in the response.

5. Token revocation endpoint

/mcp/oauth/revoke
POST
Explicitly revoke an access token or refresh token when a user unlinks their account from your app.
Form FieldRequiredDescription
tokenYesToken string to revoke
token_type_hintNoaccess_token or refresh_token
client_idYes (if unauthenticated)Your client ID (or HTTP Basic Auth)
client_secretYes (for confidential clients)Your client secret (or HTTP Basic Auth)
curl -X POST https://connextify.com/mcp/oauth/revoke \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "token=cnfy_rt_9f8234jkln" \
  -d "token_type_hint=refresh_token" \
  -d "client_id=connextify_client_abc123" \
  -d "client_secret=sec_89324098234jklfsd"
Response:
{
  "success": true,
  "message": "Token revoked"
}

Next steps

OAuth Scopes Reference

Check permission definitions for URLs, QR codes, and analytics →

Integration Testing Guide

Step-by-step instructions for testing your integration locally →