Authorization code + PKCE: sign in and redirect back with a code.
const url = 'https://api.contentsurface.io/oauth/authorize';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.contentsurface.io/oauth/authorizeThe authorization code flow with PKCE (S256), for login clients: the browser is sent here with response_type=code, client_id, an exact registered redirect_uri, code_challenge, state and scope (cs.content, and cs.admin for a client with admin access). The person signs in on the tenant’s sign-in page — a one-time code by email, or Microsoft or Google where allowed — and the browser returns to the redirect URI with a code to redeem at the token endpoint. An existing sign-in session in this browser skips the page.
An AI application (MCP client) passes the HTTPS address of its client ID metadata document as client_id and this workspace’s MCP endpoint as resource; it may sign in only while the tenant’s MCP access is on and its host is allowed, the redirect URI must be one its document lists, and the person confirms on a consent page naming the application, its host and the workspace. It is granted cs.content only. Through the global MCP address the application starts at https://auth.contentsurface.io/oauth/authorize with resource the global MCP endpoint: that page checks the application’s metadata document and redirect URI, asks for the workspace address and continues here with the same parameters; the response then carries iss https://auth.contentsurface.io.
Responses
Section titled “Responses”OK