OAuth

Register a client

Configure a partner application so it can sign users in via Teamcast.

OAuth clients represent external applications that integrate with Teamcast. Each client is registered by a SuperAdmin and receives credentials your app uses to drive the authorization-code + PKCE flow.

Client management is SuperAdmin-only. Tenant admins cannot create, view, or delete clients. End users consent to clients individually via the OAuth flow and can revoke access anytime at /account/connections.

Endpoints

MethodEndpointGatePurpose
POST/super-admin/oauth-clientsSuperAdminRegister a new client
GET/super-admin/oauth-clientsSuperAdminList clients
GET/super-admin/oauth-clients/:idSuperAdminGet one client (secret never returned)
PATCH/super-admin/oauth-clients/:idSuperAdminUpdate mutable fields
DELETE/super-admin/oauth-clients/:idSuperAdminDelete + invalidate tokens

Client fields

FieldTypeMutableDescription
namestring (3–255)yesDisplay name shown on the consent screen.
audienceTENANT | PLATFORMnoPLATFORM = any tenant's users may sign in. TENANT = only users from the bound tenant. Default: PLATFORM.
clientTypeCONFIDENTIAL | PUBLICnoCONFIDENTIAL = issued a secret. PUBLIC = SPA/mobile, no secret, PKCE mandatory.
scopesstring[]yesMaximum scopes this client may ever request.
redirectUrisstring[]yesExact-match callback URLs. http allowed only for localhost/127.0.0.1.
allowedGrantTypesstring[]yesSubset of authorization_code, refresh_token, client_credentials.
tokenEndpointAuthMethodstringyesclient_secret_basic | client_secret_post | none (public only).
requirePkcebooleanyesEnforce S256 PKCE at /authorize. Always on for PUBLIC.
accessTokenTtlSecondsint?yesPer-client override (default 900 s).
refreshTokenTtlSecondsint?yesPer-client override (default 30 d).
clientUri / logoUrl / tosUri / policyUristring?yesConsent-screen branding.

Register

The clientSecret is returned once. Store it securely; if lost, delete the client and re-register.

bash
curl -X POST https://mayaapi.teamcast.ai/api/v1/super-admin/oauth-clients \
  -H "Authorization: Bearer <SUPERADMIN_JWT>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Acme Recruiter",
    "audience": "PLATFORM",
    "clientType": "CONFIDENTIAL",
    "scopes": ["interview:read","interview:create","interview:update","interview:approve","candidate:read"],
    "redirectUris": ["https://app.acme.com/oauth/callback"],
    "allowedGrantTypes": ["authorization_code","refresh_token"],
    "tokenEndpointAuthMethod": "client_secret_basic",
    "requirePkce": true,
    "clientUri": "https://app.acme.com"
  }'

Update

Patch mutable fields. Omitted fields are left untouched. Immutable fields (clientId, clientSecret, audience, clientType) must be changed via delete + re-register.

bash
curl -X PATCH https://mayaapi.teamcast.ai/api/v1/super-admin/oauth-clients/<id> \
  -H "Authorization: Bearer <SUPERADMIN_JWT>" \
  -H "Content-Type: application/json" \
  -d '{
    "scopes": ["interview:read","interview:create","interview:update","interview:approve"],
    "redirectUris": ["https://app.acme.com/oauth/callback","http://localhost:4000/callback"]
  }'

Validation invariants

PUBLIC client

tokenEndpointAuthMethod must be none; requirePkce must be true; allowedGrantTypes cannot include client_credentials.

Redirect URIs

Required whenever authorization_code or refresh_token is an allowed grant. Must be valid URLs; http:// only permitted for localhost and 127.0.0.1. Stored and matched exactly — no wildcards, no path fuzzing.

Delete

Deletes the client record. Access tokens that have already been issued remain valid until their natural expiry; refresh tokens can no longer rotate (client auth fails).

bash
curl -X DELETE https://mayaapi.teamcast.ai/api/v1/super-admin/oauth-clients/<id> \
  -H "Authorization: Bearer <SUPERADMIN_JWT>"
Was this page helpful?