Get the OAuth protected resource metadata (RFC 9728)
On this page
GET
/.well-known/oauth-protected-resourceget_protected_resource_metadata| Risk | read |
| Authentication | none (public) |
| Scopes | none |
| Idempotency | natural: repeating the call gives the same result |
| Dry run | not applicable |
| Success status | 200 |
| Response type | application/json |
What it does#
- Use when: An OAuth client or agent needs to learn which authorization server issues tokens for this API.
- Do not use when: you use an API key (send it as a Bearer token; no discovery is needed).
- Side effects: None.
- Reversible: Not applicable, nothing changes.
- Required scope: none (public).
- Idempotency: safe to repeat.
- Typical next step: sign in at the authorization server named in authorization_servers, then call get_current_access with the access token.
Request#
Path parameters#
None.
Query parameters#
None.
Response#
| Field | Type | Required | Description |
|---|---|---|---|
resource | string | yes | |
authorization_servers | array of string | yes | |
bearer_methods_supported | array of exactly "header" | yes | |
resource_name | string | yes | |
resource_documentation | string | no |
Examples#
staging#
Request:
curl 'https://api.seemly.com/.well-known/oauth-protected-resource'const response = await fetch("https://api.seemly.com/.well-known/oauth-protected-resource");
const result = await response.json();
console.log(response.status, result);import os
import requests
response = requests.get("https://api.seemly.com/.well-known/oauth-protected-resource")
print(response.status_code, response.json())Response: 200:
{
"resource": "https://api.seemly.com",
"authorization_servers": [
"https://auth.seemly.com"
],
"bearer_methods_supported": [
"header"
],
"resource_name": "Seemly API"
}Errors#
| Status | Codes |
|---|---|
| 503 | service_unavailable |
Every error is an application/problem+json body with a code, a fix sentence and next_actions. See reading a problem response.