POST Register a public OAuth client
/oauth/register
Registers a public client with token_endpoint_auth_method none and authorization_code only. HTTPS redirect URIs and explicit loopback redirects are validated; registration is rate-limited.
On this page
Access and permissions
Registers a public client with token_endpoint_auth_method none and authorization_code only. HTTPS redirect URIs and explicit loopback redirects are validated; registration is rate-limited.
No account sign-in is required. Any listed browser-origin checks and rate limits still apply.
Parameters and headers
No path, query or additional request-header parameters.
Request body
| Field | Type and limits | Required | Meaning |
|---|---|---|---|
| $ | object | Yes | — |
| $.client_name | string; {"maxLength":128,"minLength":1} | Yes | Display name shown during OAuth consent. |
| $.grant_types | array<string; {"enum":["authorization_code","refresh_token"]}>; {"maxItems":1} | No | — |
| $.grant_types[] | string; {"enum":["authorization_code","refresh_token"]} | Yes | — |
| $.redirect_uris | array<string; {"format":"uri"}>; {"maxItems":5,"minItems":1} | Yes | Allowed exact redirect addresses. HTTPS or validated loopback addresses are required. |
| $.redirect_uris[] | string; {"format":"uri"} | Yes | — |
| $.response_types | array<JSON; {"const":"code"}>; {"maxItems":1} | No | — |
| $.response_types[] | JSON; {"const":"code"} | Yes | — |
| $.token_endpoint_auth_method | string; {"default":"none","enum":["","none"]} | No | — |
Responses
| Header | Type and limits | Meaning |
|---|---|---|
| Cache-Control | string; {"pattern":"(?:^|,\\s*)no-store(?:,|$)"} | Private API responses prohibit storage. Public OAuth metadata is cached for 300 seconds; live streams additionally prohibit transformation. |
| Content-Language | string; {"enum":["en","de"]} | Language of human-readable response text, resolved from Accept-Language or the documented browser preference. Technical codes and identifiers remain stable. |
| Referrer-Policy | JSON; {"enum":["strict-origin-when-cross-origin","no-referrer"]} | The default referrer policy is strict-origin-when-cross-origin. Provider-login responses use no-referrer to protect login parameters. |
| Vary | string | Responses vary by Accept-Language; browser-rendered responses can also vary by the preference cookie. |
| X-Content-Type-Options | JSON; {"const":"nosniff"} | The browser must use the declared content type. |
| X-Frame-Options | JSON; {"const":"DENY"} | The response must not be embedded in a frame. |
| X-Request-ID | string | Server-generated request identifier. Include this when reporting an error; inbound values are not trusted. |
application/json
| Field | Type and limits | Required | Meaning |
|---|---|---|---|
| $ | object | Yes | — |
| $.client_id | string | Yes | OAuth client identifier returned by public client registration. |
| $.client_name | string | Yes | Display name shown during OAuth consent. |
| $.grant_types | array<string> | Yes | — |
| $.grant_types[] | string | Yes | — |
| $.redirect_uris | array<string> | Yes | Allowed exact redirect addresses. HTTPS or validated loopback addresses are required. |
| $.redirect_uris[] | string | Yes | — |
| $.response_types | array<string> | Yes | — |
| $.response_types[] | string | Yes | — |
| $.token_endpoint_auth_method | string | Yes | — |
{
"client_id": "demo",
"client_name": "demo",
"grant_types": [],
"redirect_uris": [],
"response_types": [],
"token_endpoint_auth_method": "demo"
}| Stable error codes |
|---|
| invalid_client_metadata |
| invalid_peer |
| invalid_redirect_uri |
| Header | Type and limits | Meaning |
|---|---|---|
| Cache-Control | string; {"pattern":"(?:^|,\\s*)no-store(?:,|$)"} | Private API responses prohibit storage. Public OAuth metadata is cached for 300 seconds; live streams additionally prohibit transformation. |
| Content-Language | string; {"enum":["en","de"]} | Language of human-readable response text, resolved from Accept-Language or the documented browser preference. Technical codes and identifiers remain stable. |
| Referrer-Policy | JSON; {"enum":["strict-origin-when-cross-origin","no-referrer"]} | The default referrer policy is strict-origin-when-cross-origin. Provider-login responses use no-referrer to protect login parameters. |
| Vary | string | Responses vary by Accept-Language; browser-rendered responses can also vary by the preference cookie. |
| X-Content-Type-Options | JSON; {"const":"nosniff"} | The browser must use the declared content type. |
| X-Frame-Options | JSON; {"const":"DENY"} | The response must not be embedded in a frame. |
| X-Request-ID | string | Server-generated request identifier. Include this when reporting an error; inbound values are not trusted. |
application/problem+json
| Field | Type and limits | Required | Meaning |
|---|---|---|---|
| $ | Problem | Yes | — |
| $.code | string | Yes | Stable machine-readable error code |
| $.detail | string | Yes | Short localized explanation without internal error details |
| $.instance | string | Yes | Unique relative identifier /api/v1/requests/{request_id}; not a retrievable resource |
| $.message | string | Yes | Temporarily identical to detail for existing clients |
| $.message_key | string | Yes | Stable translation key for changing the displayed language without another request |
| $.message_params | object; {"additionalProperties":true} | Yes | Named, safely rendered message parameters; never arbitrary HTML |
| $.request_id | string; {"pattern":"^[0-9a-f]{32}$"} | Yes | Server-generated diagnostic identifier. It contains no login token or credential. |
| $.status | integer; {"maximum":599,"minimum":400} | Yes | — |
| $.title | string | Yes | Localized HTTP status title |
| $.type | string; {"const":"about:blank"} | Yes | — |
{
"code": "demo",
"detail": "Demo error detail; inspect the documented code.",
"instance": "demo",
"message": "Demo error detail; inspect the documented code.",
"message_key": "errors.requestFailed",
"message_params": {},
"request_id": "00000000000000000000000000000000",
"status": 400,
"title": "Demo error",
"type": "about:blank"
}| Stable error codes |
|---|
| rate_limited |
| Header | Type and limits | Meaning |
|---|---|---|
| Cache-Control | string; {"pattern":"(?:^|,\\s*)no-store(?:,|$)"} | Private API responses prohibit storage. Public OAuth metadata is cached for 300 seconds; live streams additionally prohibit transformation. |
| Content-Language | string; {"enum":["en","de"]} | Language of human-readable response text, resolved from Accept-Language or the documented browser preference. Technical codes and identifiers remain stable. |
| Referrer-Policy | JSON; {"enum":["strict-origin-when-cross-origin","no-referrer"]} | The default referrer policy is strict-origin-when-cross-origin. Provider-login responses use no-referrer to protect login parameters. |
| Retry-After | string; {"pattern":"^[0-9]+$"} | Seconds before retry. Preserve supported idempotency identifiers and respect the operation’s mutation semantics. |
| Vary | string | Responses vary by Accept-Language; browser-rendered responses can also vary by the preference cookie. |
| X-Content-Type-Options | JSON; {"const":"nosniff"} | The browser must use the declared content type. |
| X-Frame-Options | JSON; {"const":"DENY"} | The response must not be embedded in a frame. |
| X-Request-ID | string | Server-generated request identifier. Include this when reporting an error; inbound values are not trusted. |
application/problem+json
| Field | Type and limits | Required | Meaning |
|---|---|---|---|
| $ | Problem | Yes | — |
| $.code | string | Yes | Stable machine-readable error code |
| $.detail | string | Yes | Short localized explanation without internal error details |
| $.instance | string | Yes | Unique relative identifier /api/v1/requests/{request_id}; not a retrievable resource |
| $.message | string | Yes | Temporarily identical to detail for existing clients |
| $.message_key | string | Yes | Stable translation key for changing the displayed language without another request |
| $.message_params | object; {"additionalProperties":true} | Yes | Named, safely rendered message parameters; never arbitrary HTML |
| $.request_id | string; {"pattern":"^[0-9a-f]{32}$"} | Yes | Server-generated diagnostic identifier. It contains no login token or credential. |
| $.status | integer; {"maximum":599,"minimum":400} | Yes | — |
| $.title | string | Yes | Localized HTTP status title |
| $.type | string; {"const":"about:blank"} | Yes | — |
{
"code": "demo",
"detail": "Demo error detail; inspect the documented code.",
"instance": "demo",
"message": "Demo error detail; inspect the documented code.",
"message_key": "errors.requestFailed",
"message_params": {},
"request_id": "00000000000000000000000000000000",
"status": 429,
"title": "Demo error",
"type": "about:blank"
}| Stable error codes |
|---|
| feature_unavailable |
| unavailable |
| Header | Type and limits | Meaning |
|---|---|---|
| Cache-Control | string; {"pattern":"(?:^|,\\s*)no-store(?:,|$)"} | Private API responses prohibit storage. Public OAuth metadata is cached for 300 seconds; live streams additionally prohibit transformation. |
| Content-Language | string; {"enum":["en","de"]} | Language of human-readable response text, resolved from Accept-Language or the documented browser preference. Technical codes and identifiers remain stable. |
| Referrer-Policy | JSON; {"enum":["strict-origin-when-cross-origin","no-referrer"]} | The default referrer policy is strict-origin-when-cross-origin. Provider-login responses use no-referrer to protect login parameters. |
| Retry-After | string; {"pattern":"^[0-9]+$"} | Seconds before retry. Preserve supported idempotency identifiers and respect the operation’s mutation semantics. |
| Vary | string | Responses vary by Accept-Language; browser-rendered responses can also vary by the preference cookie. |
| X-Content-Type-Options | JSON; {"const":"nosniff"} | The browser must use the declared content type. |
| X-Frame-Options | JSON; {"const":"DENY"} | The response must not be embedded in a frame. |
| X-Request-ID | string | Server-generated request identifier. Include this when reporting an error; inbound values are not trusted. |
application/problem+json
| Field | Type and limits | Required | Meaning |
|---|---|---|---|
| $ | Problem | Yes | — |
| $.code | string | Yes | Stable machine-readable error code |
| $.detail | string | Yes | Short localized explanation without internal error details |
| $.instance | string | Yes | Unique relative identifier /api/v1/requests/{request_id}; not a retrievable resource |
| $.message | string | Yes | Temporarily identical to detail for existing clients |
| $.message_key | string | Yes | Stable translation key for changing the displayed language without another request |
| $.message_params | object; {"additionalProperties":true} | Yes | Named, safely rendered message parameters; never arbitrary HTML |
| $.request_id | string; {"pattern":"^[0-9a-f]{32}$"} | Yes | Server-generated diagnostic identifier. It contains no login token or credential. |
| $.status | integer; {"maximum":599,"minimum":400} | Yes | — |
| $.title | string | Yes | Localized HTTP status title |
| $.type | string; {"const":"about:blank"} | Yes | — |
{
"code": "demo",
"detail": "Demo error detail; inspect the documented code.",
"instance": "demo",
"message": "Demo error detail; inspect the documented code.",
"message_key": "errors.requestFailed",
"message_params": {},
"request_id": "00000000000000000000000000000000",
"status": 503,
"title": "Demo error",
"type": "about:blank"
}Retries and asynchronous work
This change does not have a general retry guarantee. If the response is unclear, read the affected resource before trying again. Follow Retry-After waiting times and request new sign-in or action codes when they expire.
Request examples
Replace demo IDs, timestamps and placeholders with your own values. For a retry, keep the same IDs, time and content. These examples do not run requests on this page.
Keep login links, codes, cookies and keys private. Do not print them in logs or share them in support requests.
curl --silent --show-error --output /dev/null --write-out "%{http_code}\n" \
--request POST \
--header "Content-Type: application/json" \
--data-binary '{"client_name":"demo","redirect_uris":["https://example.com/callback"]}' \
"https://metribeacon.com/oauth/register"
import json
from pathlib import Path
from urllib.request import Request, HTTPRedirectHandler, build_opener
from urllib.error import HTTPError
headers = {}
headers["Content-Type"] = "application/json"
request = Request("https://metribeacon.com/oauth/register", data="{\"client_name\":\"demo\",\"redirect_uris\":[\"https://example.com/callback\"]}".encode("utf-8"), headers=headers, method="POST")
class NoRedirect(HTTPRedirectHandler):
def redirect_request(self, request, fp, code, message, headers, target):
return None
opener = build_opener(NoRedirect())
try:
with opener.open(request, timeout=10) as response:
print(response.status)
except HTTPError as error:
print(error.code)
error.close()
import { readFile } from "node:fs/promises";
import { homedir } from "node:os";
import { join } from "node:path";
const headers = {};
headers["Content-Type"] = "application/json";
const response = await fetch("https://metribeacon.com/oauth/register", {
method: "POST", headers, redirect: "manual",
signal: AbortSignal.timeout(10000), body: "{\"client_name\":\"demo\",\"redirect_uris\":[\"https://example.com/callback\"]}",
});
console.log(response.status);
await response.body?.cancel();
package main
import (
"fmt"
"net/http"
"time"
"strings"
)
func main() {
request, err := http.NewRequest("POST", "https://metribeacon.com/oauth/register", strings.NewReader("{\"client_name\":\"demo\",\"redirect_uris\":[\"https://example.com/callback\"]}"))
if err != nil { panic("request failed; credentials and response omitted") }
request.Header.Set("Content-Type", "application/json")
client := &http.Client{Timeout: 10*time.Second, CheckRedirect: func(*http.Request, []*http.Request) error { return http.ErrUseLastResponse }}
response, err := client.Do(request)
if err != nil { panic("request failed; credentials and response omitted") }
defer response.Body.Close()
fmt.Println(response.StatusCode)
}
Related guides
- HTTP API, OAuth and MCP
Find the user API endpoints, their permissions, fields, examples and response formats.
- GET Request or confirm OAuth consent
GET prepares explicit browser consent after sign-in. POST confirms one pending consent request using Origin and CSRF. Requires PKCE S256, an exact registered redirect and the canonical /mcp resource; codes expire after five minutes. Required query parameters occur exactly once. URI length is limited to 2048 bytes. The redirect must exactly match a registered HTTPS or loopback URI. Supported scopes: account:read, config:read, config:write, telemetry:read.
- POST Request or confirm OAuth consent
GET prepares explicit browser consent after sign-in. POST confirms one pending consent request using Origin and CSRF. Requires PKCE S256, an exact registered redirect and the canonical /mcp resource; codes expire after five minutes. The CSRF value is supplied as form field csrf_token and must match the __Host-mb_csrf cookie and this session. Consent is consumed once; an authorization code is issued only for approve.
- POST Exchange an authorization code for an MCP access token
Accepts application/x-www-form-urlencoded authorization_code, client_id, redirect_uri, code_verifier and resource. Codes are single-use; access tokens last 15 minutes and no refresh token is issued. All form fields occur exactly once. The code expires after five minutes, is consumed once, and is bound to the exact client, redirect, resource and S256 verifier. The resulting Bearer token expires after 900 seconds. No refresh token is issued.