Well-known documents
Generated HTTP reference for the 2 operations the published OpenAPI document describes under .well-known.
1 min read
Well-known documents
This page is generated from the published OpenAPI document. It is complete with respect to that document and says nothing about surfaces the document does not describe yet. See what is generated here for what that means.
Base URL: https://api.codespar.dev
None of the operations below takes a credential: the published document declares them open. See Authentication for the rest of the API.
GET /.well-known/oauth-authorization-server
GET
https://api.codespar.dev/.well-known/oauth-authorization-serverNo credential
Authorization-server metadata (RFC 8414)
Responses
| Status | Body | Description |
|---|---|---|
200 | object | OK |
Response 200
| Field | Type | Required | Description |
|---|---|---|---|
authorization_endpoint | string | yes | — |
code_challenge_methods_supported | array of string | yes | — |
grant_types_supported | array of string | yes | — |
issuer | string | yes | — |
registration_endpoint | string | yes | — |
response_types_supported | array of string | yes | — |
scopes_supported | array of string | yes | — |
token_endpoint | string | yes | — |
token_endpoint_auth_methods_supported | array of string | yes | — |
Example request
curl -X GET https://api.codespar.dev/.well-known/oauth-authorization-server \
-H "Authorization: Bearer $CODESPAR_API_KEY"const res = await fetch("https://api.codespar.dev/.well-known/oauth-authorization-server", {
method: "GET",
headers: {
Authorization: `Bearer ${process.env.CODESPAR_API_KEY}`,
},
});
const data = await res.json();Example response 200
{
"issuer": "string",
"authorization_endpoint": "https://example.com/hook",
"token_endpoint": "https://example.com/hook",
"registration_endpoint": "https://example.com/hook",
"response_types_supported": [
"string"
],
"grant_types_supported": [
"string"
],
"code_challenge_methods_supported": [
"string"
],
"token_endpoint_auth_methods_supported": [
"https://example.com/hook"
],
"scopes_supported": [
"string"
]
}GET /.well-known/oauth-protected-resource
GET
https://api.codespar.dev/.well-known/oauth-protected-resourceNo credential
Protected-resource metadata (RFC 9728)
Responses
| Status | Body | Description |
|---|---|---|
200 | object | OK |
Response 200
| Field | Type | Required | Description |
|---|---|---|---|
authorization_servers | array of string | yes | — |
bearer_methods_supported | array of string | yes | — |
resource | string | yes | — |
scopes_supported | array of string | yes | — |
Example request
curl -X GET https://api.codespar.dev/.well-known/oauth-protected-resource \
-H "Authorization: Bearer $CODESPAR_API_KEY"const res = await fetch("https://api.codespar.dev/.well-known/oauth-protected-resource", {
method: "GET",
headers: {
Authorization: `Bearer ${process.env.CODESPAR_API_KEY}`,
},
});
const data = await res.json();Example response 200
{
"resource": "string",
"authorization_servers": [
"string"
],
"bearer_methods_supported": [
"string"
],
"scopes_supported": [
"string"
]
}