Warteliste offen: Hol dir früh Zugang

API-Referenz: MCP-Anmeldung

6 Endpunkte der Gruppe «MCP-Anmeldung». Die Referenz stammt aus der englischen OpenAPI-Spezifikation und ist nicht übersetzt.

Protected Resource Metadata of the MCP server (RFC 9728)

GET/.well-known/oauth-protected-resource/mcp Ohne API-Key

The MCP server answers a request without a token with 401 and WWW-Authenticate with resource_metadata pointing here. mcp.sendtide.ch serves it at /.well-known/oauth-protected-resource.

Beispiel

curl "https://api.sendtide.ch/.well-known/oauth-protected-resource/mcp"

Antworten

StatusBeschreibung
200 Metadata
Felder der Antwort
resourcestring
authorization_serversarray<string>
scopes_supportedarray<enum: read | send | full>
bearer_methods_supportedarray<string>

Authorization server metadata (RFC 8414)

GET/.well-known/oauth-authorization-server Ohne API-Key

Beispiel

curl "https://api.sendtide.ch/.well-known/oauth-authorization-server"

Antworten

StatusBeschreibung
200 Metadata with the endpoints, code_challenge_methods_supported [S256], grant types authorization_code and refresh_token

Register a client (Dynamic Client Registration, RFC 7591)

POST/oauth/register Ohne API-Key

Open to anyone, at most 20 registrations per client address and hour. Redirect URIs are https, http to localhost, 127.0.0.1 or [::1] (any port at use), or a private-use scheme of a native app; never a fragment. A client with token_endpoint_auth_method none proves itself with PKCE only; client_secret_post and client_secret_basic get a secret.

Request-Body application/json

FeldTypBeschreibung
redirect_uris *array<string>
client_namestring
client_uristring
token_endpoint_auth_methodenum: none | client_secret_post | client_secret_basic
grant_typesarray<enum: authorization_code | refresh_token>
response_typesarray<enum: code>

Beispiel

curl -X POST "https://api.sendtide.ch/oauth/register" \
  -H "Content-Type: application/json" \
  -d '{"redirect_uris":["string"]}'

Antworten

StatusBeschreibung
201 Registered
400 invalid_redirect_uri or invalid_client_metadata
429 Too many registrations

Start the sign-in (authorization code with PKCE)

GET/oauth/authorize Ohne API-Key

Opened in the browser. An unknown client or redirect URI shows an error page. Otherwise errors go back to the redirect URI with error, state and iss; a valid request goes to the dashboard, where the user picks the account, the access (read, send, full) and whether real mail may be delivered (off by default: test mode), and comes back with code, state and iss. The code is valid once, for 60 seconds.

Parameter

NameOrtTypBeschreibung
response_type *queryenum: code
client_id *querystring
redirect_uriquerystring
state *querystring
code_challenge *querystring
code_challenge_method *queryenum: S256
resourcequerystringRFC 8707: the URL of the MCP server, e.g. https://mcp.sendtide.ch
scopequerystringA suggestion for the consent page (read

Beispiel

curl "https://api.sendtide.ch/oauth/authorize?response_type=code&client_id=…&state=…&code_challenge=…&code_challenge_method=S256"

Antworten

StatusBeschreibung
302 To the dashboard or back to the client
400 Error page

Exchange a code or a refresh token

POST/oauth/token Ohne API-Key

authorization_code needs code, redirect_uri, code_verifier and client_id; refresh_token needs refresh_token and client_id. Access tokens are valid one hour. Each refresh gives a new refresh token; using an old one again revokes the whole grant. A used code presented again revokes what it gave. resource, when sent, must be the MCP server.

Request-Body application/x-www-form-urlencoded

FeldTypBeschreibung
grant_type *enum: authorization_code | refresh_token
codestring
redirect_uristring
code_verifierstring
refresh_tokenstring
client_idstring
client_secretstring
resourcestring
scopestring

Beispiel

curl -X POST "https://api.sendtide.ch/oauth/token" \
  -d token=…

Antworten

StatusBeschreibung
200 Tokens
Felder der Antwort
access_tokenstring
token_typeenum: Bearer
expires_ininteger
refresh_tokenstring
scopeenum: read | send | full
400 invalid_grant
401 invalid_client

Revoke a token (RFC 7009)

POST/oauth/revoke Ohne API-Key

Revoking either token of a grant ends the whole grant. Answers 200 also for unknown tokens.

Request-Body application/x-www-form-urlencoded

FeldTypBeschreibung
token *string
token_type_hintstring
client_idstring
client_secretstring

Beispiel

curl -X POST "https://api.sendtide.ch/oauth/revoke" \
  -d token=…

Antworten

StatusBeschreibung
200 Revoked (or unknown)
401 invalid_client