Genaya Connect

Sign in with Genaya

The OAuth 2.1 authorization server behind the MCP connector - discovery documents, the token endpoint, revocation and dynamic client registration. Root of the API host, not /v1.

GEThttps://api.genaya.com/.well-known/oauth-authorization-server

Authorization server metadata

The RFC 8414 discovery document of the "Sign in with Genaya" server MCP hosts read before they start a sign-in: where to authorize, exchange a code and revoke, that only the authorization code grant with PKCE S256 is supported, that clients are public (token_endpoint_auth_method none), that a client may identify itself with a Client ID Metadata Document, and the five scopes. registration_endpoint is present only while dynamic client registration is switched on (available on request). Served from memory with Cache-Control public, max-age=300; no credential is needed.

Response 200

FieldTypeDescription
issuer
string
authorization_endpoint
string
token_endpoint
string
revocation_endpoint
string
registration_endpoint
string
Present only while dynamic client registration is switched on (available on request).
response_types_supported
array of string
grant_types_supported
array of string
code_challenge_methods_supported
array of string
PKCE is required and only S256 is accepted; plain is refused.
token_endpoint_auth_methods_supported
array of string
Public clients only - no client secret is ever issued or accepted.
revocation_endpoint_auth_methods_supported
array of string
client_id_metadata_document_supported
boolean
A client may identify itself with an https client_id that serves its own metadata document.
authorization_response_iss_parameter_supported
boolean
The authorization response carries iss (RFC 9207).
scopes_supported
array of string
service_documentation
string

Errors

429Too many discovery requests from one address in a short time (error temporarily_unavailable). Wait for the Retry-After seconds; hosts cache the document for five minutes, so a healthy client never sees this.
GEThttps://api.genaya.com/.well-known/oauth-protected-resource

Protected resource metadata

The RFC 9728 document that names the MCP endpoint as the protected resource (https://api.genaya.com/mcp) and points at the authorization server that issues tokens for it. The same document is served at the path form /.well-known/oauth-protected-resource/mcp, which is the resource_metadata URL every 401 challenge on POST /mcp carries. Served from memory with Cache-Control public, max-age=300; no credential is needed.

Response 200

FieldTypeDescription
resource
string
The one resource every token is minted for. Compared against this literal, never against the request URL.
authorization_servers
array of string
scopes_supported
array of string
bearer_methods_supported
array of string
Tokens travel in the Authorization header only - a token in the URL or the body is refused.
resource_documentation
string

Errors

429Too many discovery requests from one address in a short time (error temporarily_unavailable). Wait for the Retry-After seconds.
POSThttps://api.genaya.com/oauth/token

Exchange a code or refresh a token

The token endpoint of "Sign in with Genaya". Accepts application/x-www-form-urlencoded (RFC 6749) or application/json, 16 KB at most. Public clients only: send client_id and never a client_secret or client_assertion (either answers 401 invalid_client). grant_type=authorization_code exchanges the one-time code the consent page returned (gny_ac_..., valid 10 minutes, single use decided inside a transaction). The code_verifier must hash (S256) to the code_challenge the authorize request carried, redirect_uri must be the exact one the code was issued for, client_id must be the client the code was issued to, and resource, when sent, must be https://api.genaya.com/mcp. A mismatch counts an attempt; the fifth burns the code. Mints a one-hour access token (gny_at_...) and, only when offline_access was granted, a 30-day refresh token (gny_rt_...). grant_type=refresh_token rotates the pair. The refresh token is bound to the client_id that received it and to the canonical resource: a refresh from another client or for another resource answers invalid_grant and revokes the whole token family. The immediately previous refresh token replays the same new pair for 30 seconds (the hosts' double refresh); anything older is reuse - the family is revoked, the member is told by email and notification, and the host must sign in again. A connection older than the organization's reconnect interval (default 90 days) answers invalid_grant with "reconnect required". Windows: 5 exchanges a minute per code, 10 refreshes a minute per token family, a 1,000-a-minute ceiling per address - never per client_id, because every Claude customer shares one. An infrastructure failure is answered 503 temporarily_unavailable with Retry-After, never as invalid_grant, so a blip cannot disconnect every customer. Every response carries Cache-Control no-store.

Request body

FieldTypeDescription
grant_typerequired
enumauthorization_code | refresh_token
authorization_code exchanges the consent page's code; refresh_token rotates a pair.
client_idrequired
string
The client's identity - a pre-registered id (ChatGPT, Claude, Claude Code), an https Client ID Metadata Document URL, or a dcr_ id from dynamic client registration. Public clients only: never send client_secret or client_assertion.
code
string
authorization_code only - the one-time code from the consent page (gny_ac_..., valid 10 minutes).
redirect_uri
string
authorization_code only - the exact redirect_uri the authorize request carried.
code_verifier
string
authorization_code only - the PKCE verifier whose S256 hash is the code_challenge sent on the authorize request.
refresh_token
string
refresh_token only - the current refresh token (gny_rt_...). Rotated on every use.
resource
string
Optional. The one resource, https://api.genaya.com/mcp - anything else answers invalid_grant. Defaults to it when omitted.

Response 200

FieldTypeDescription
access_token
string
The connection token, gny_at_... - send it as Authorization Bearer on POST /mcp. Valid one hour.
token_type
string
expires_in
integer
Seconds until the access token expires (3600).
refresh_token
string
gny_rt_..., present only when offline_access was granted. Valid 30 days, rotated on every use, bound to this client_id and to https://api.genaya.com/mcp.
scope
string
The space-separated scopes the member granted.

Errors

400invalid_request (grant_type missing), unsupported_grant_type (anything but authorization_code or refresh_token), or invalid_grant (the code or refresh token is malformed, unknown, expired, already used, burned, issued to another client or redirect, the PKCE verifier does not match, the connection was disconnected, the refresh token was reused, or a reconnect is required - error_description says which in plain words).
401invalid_client - client_id is missing, or a client_secret / client_assertion was sent (Genaya connections are public clients).
429temporarily_unavailable - the per-code, per-family or per-address window is exhausted. Retry after the Retry-After seconds.
503temporarily_unavailable - Genaya could not complete the request (an infrastructure failure, or the connector is switched off). Retry after the Retry-After seconds; never treat this as a bad grant.
POSThttps://api.genaya.com/oauth/revoke

Revoke a connection

RFC 7009. Either token of a family - the access token or the refresh token - revokes the member's connection and every token issued for it; the member is told by email and notification. Accepts application/x-www-form-urlencoded or application/json. Always answers 200 with an empty object, whatever the token (unknown, already revoked, malformed, or while the connector is switched off), so a host can never retry a revoke into a loop. Members can also revoke any connection in the Genaya app under Settings > Integrations.

Request body

FieldTypeDescription
tokenrequired
string
The access token (gny_at_...) or refresh token (gny_rt_...) of the connection to revoke. Either revokes the whole family.
client_id
string
Optional - the client the token was issued to.

Response 200

No fields.

Errors

429temporarily_unavailable - the per-address ceiling is exhausted. Retry after the Retry-After seconds.
POSThttps://api.genaya.com/oauth/register

Register a client (dynamic client registration)

RFC 7591 dynamic client registration, for an MCP client that has no Client ID Metadata Document of its own. Available on request: it is switched off by default, the endpoint answers 404 while it is off, and the discovery document omits registration_endpoint - write to help@genaya.com with the client you are building. When on: JSON only, 16 KB at most, 10 registrations a minute per address; redirect_uris must be https or a loopback address (http://localhost/... or http://127.0.0.1/..., any port), application_type is required (web or native), token_endpoint_auth_method must be none, and the returned client_id starts with dcr_. A registered client always renders as "Unverified app" on the consent page and needs an organization that allows "Other" assistants; a registration that never authorizes is purged after 90 days unused.

Request body

FieldTypeDescription
redirect_urisrequired
array of string
Where the consent page may send the code - https URIs, or http://localhost/... and http://127.0.0.1/... (a loopback path matches on any port).
application_typerequired
enumweb | native
Required.
client_name
string
Shown on the consent page next to "Unverified app". Control characters are stripped; typographic dashes become hyphens.
client_uri
string
Optional home page of the client.
token_endpoint_auth_method
enumnone
Must be none when sent (the default).
grant_types
array of string
Optional; may only contain authorization_code and refresh_token.
response_types
array of string
Optional; may only contain code.

Response 201

FieldTypeDescription
client_id
string
The client's id, starting with dcr_. Send it as client_id on the authorize and token requests.
client_id_issued_at
integer
Epoch seconds.
client_name
string
client_uri
string
redirect_uris
array of string
token_endpoint_auth_method
string
grant_types
array of string
response_types
array of string
application_type
string

Errors

400invalid_redirect_uri (no redirect_uris, more than 16, or one that is not https or loopback) or invalid_client_metadata (not a JSON object, a Content-Type other than application/json, a token_endpoint_auth_method other than none, a missing or unknown application_type, or grant_types / response_types beyond authorization_code, refresh_token and code).
404Dynamic client registration is switched off (the default). Ask for it, or identify the client with a Client ID Metadata Document.
429temporarily_unavailable - more than 10 registrations a minute from one address. Retry after the Retry-After seconds.
503temporarily_unavailable - Genaya could not store the registration, or the connector is switched off. Retry after the Retry-After seconds.