Get how visitors sign in
The sign-in method and its settings. The OIDC client secret is never returned.
GET
/site/sign-inAuthorization
AuthorizationBearer token · headerrequired`MEDIAN_KEY` from Settings under API, or an MCP OAuth access token. A key acts as the organization; a token acts as the person who approved it.
Responses
200The sign-in settings.
methodstringmedian: Median accounts. app: a route in your app. oidc: an OpenID Connect provider.
Allowed:
medianappoidcappUrlstring | nullThe sign-in route in your app, for app.
oidcobject | nullShow propertiesHide properties
issuerstringclientIdstringsecretHintstringThe client secret's last four characters.
oidcRedirectUristringThe redirect URI to register at your OpenID provider.
problemobject | nullWhy your OpenID provider refused the last sign-in. Cleared when a sign-in works or the settings are saved.
Show propertiesHide properties
atnumberWhen it happened, in milliseconds since the epoch.
codestringThe provider's error code, like invalid_scope.
messagestringWhat to change.
detailstring | nullThe provider's own words.
401The bearer token is missing, revoked, or expired.
errorobjectShow propertiesHide properties
codestringmessagestring429Too many requests. Wait the seconds in `Retry-After`. Limits depend on the plan. See [rate limits](/api/errors-and-limits#rate-limits).
errorobjectShow propertiesHide properties
codestringmessagestringRequest
curl -X GET "https://api.median.sh/v1/site/sign-in" \
-H "Authorization: Bearer YOUR_TOKEN"const response = await fetch("https://api.median.sh/v1/site/sign-in", {
method: "GET",
headers: {
"Authorization": "Bearer YOUR_TOKEN"
}
});Response
{
"method": "median",
"appUrl": "string",
"oidc": {
"issuer": "string",
"clientId": "string",
"secretHint": "string"
},
"oidcRedirectUri": "string",
"problem": {
"at": 0,
"code": "string",
"message": "string",
"detail": "string"
}
}{
"error": {
"code": "string",
"message": "string"
}
}{
"error": {
"code": "string",
"message": "string"
}
}