Authentication
Requires JWT token or Platform API key via Authorization: Bearer <token> header.
OAuth authorization code from provider
OAuth state parameter (for CSRF protection)
Example Request
curl -X POST "https://api.app.shinzo.ai/v1/mcp/servers/abc123/oauth/callback?code=AUTH_CODE_HERE&state=STATE_HERE" \
-H "Authorization: Bearer <token>"
Example Response
{
"message": "OAuth authentication successful",
"server_id": "abc123",
"provider": "google",
"authenticated_at": "2026-02-24T15:00:00Z"
}
Internal Use: This endpoint is typically called automatically as part of the OAuth redirect flow initiated by OAuth Authorize. You rarely need to call it directly.
OAuth Flow
This endpoint is step 4 in the OAuth flow:
- User calls
/mcp/servers/{id}/oauth/authorize
- OAuth provider shows authorization page
- User grants permissions
- Provider redirects here with authorization code ← This endpoint
- Backend exchanges code for access token
- MCP server configured with credentials
Response Fields
UUID of the MCP server that was authenticated
OAuth provider name (e.g., "google", "github", "slack")
ISO 8601 timestamp of when authentication completed
Status Codes
| Code | Description |
|---|
200 | OAuth authentication successful |
400 | Invalid or expired authorization code |
401 | Unauthorized - invalid or missing authentication |
404 | MCP server not found |