Skip to main content

Well-known documents

Generated HTTP reference for the 2 operations the published OpenAPI document describes under .well-known.

1 min read
View MarkdownEdit on GitHub

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

GEThttps://api.codespar.dev/.well-known/oauth-authorization-server
No credential

Authorization-server metadata (RFC 8414)

Responses

StatusBodyDescription
200objectOK

Response 200

FieldTypeRequiredDescription
authorization_endpointstringyes
code_challenge_methods_supportedarray of stringyes
grant_types_supportedarray of stringyes
issuerstringyes
registration_endpointstringyes
response_types_supportedarray of stringyes
scopes_supportedarray of stringyes
token_endpointstringyes
token_endpoint_auth_methods_supportedarray of stringyes
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
application/json
{
  "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

GEThttps://api.codespar.dev/.well-known/oauth-protected-resource
No credential

Protected-resource metadata (RFC 9728)

Responses

StatusBodyDescription
200objectOK

Response 200

FieldTypeRequiredDescription
authorization_serversarray of stringyes
bearer_methods_supportedarray of stringyes
resourcestringyes
scopes_supportedarray of stringyes
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
application/json
{
  "resource": "string",
  "authorization_servers": [
    "string"
  ],
  "bearer_methods_supported": [
    "string"
  ],
  "scopes_supported": [
    "string"
  ]
}
Well-known documents | CodeSpar