This page documents the OAuth 2.0 HTTP endpoints implemented by Connextify per RFC 6749, RFC 7636, RFC 7591, and RFC 8414.
/.well-known/oauth-authorization-server
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
Register a new third-party OAuth client (RFC 7591) without needing manual developer console approval.
Request body parameters
Field Type Required Description client_namestring Yes Human-readable name shown to users on the consent screen. redirect_urisstring[] Yes Allowed HTTPS redirect URLs (HTTP allowed for localhost). grant_typesstring[] No Defaults to ["authorization_code"]. response_typesstring[] No Defaults to ["code"]. scopestring No Space-separated list of scopes your app will request (defaults to "url:read url:create"). client_uristring No Homepage URL for your application. policy_uristring No Link to your Privacy Policy. tos_uristring No Link 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
Redirect the user to this page in their browser. Displays the Connextify login (if unauthenticated) and consent dialog.
Query parameters
Parameter Type Required Description client_idstring Yes Your registered client ID. redirect_uristring Yes Must match one of your registered redirect_uris. response_typestring Yes Must be code. scopestring Yes Space- or plus-separated list of scopes to request. statestring Yes Random CSRF verification string generated by your app. code_challengestring Yes Base64URL-encoded SHA-256 hash of your PKCE verifier. code_challenge_methodstring Yes Must be S256. workspace_idstring No Optional 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
Exchange an authorization code for access and refresh tokens, or refresh an expired access token.
A. Authorization code grant
Form Field Value Notes grant_typeauthorization_codeFixed string codestring Authorization code received at your callback client_idstring Your client ID client_secretstring Your client secret redirect_uristring Must match the redirect_uri from step 3 code_verifierstring Plain-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"
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 Field Value grant_typerefresh_tokenrefresh_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
Explicitly revoke an access token or refresh token when a user unlinks their account from your app.
Form Field Required Description tokenYes Token string to revoke token_type_hintNo access_token or refresh_tokenclient_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 →