OAuth2 protected resource metadata.
GET
OK
application/json- response
authorization_servers?array<string>bearer_methods_supported?array<string>resource?stringscopes_supported?array<string>The samples read CODER_URL and CODER_SESSION_TOKEN: set up your environment.
curl -X GET \ "$CODER_URL/.well-known/oauth-protected-resource"const { CODER_URL } = process.env;const url = `${CODER_URL}/.well-known/oauth-protected-resource`;const response = await fetch(url, { method: "GET",});console.log(response.status, await response.text());import osimport requestsurl = os.environ["CODER_URL"] + "/.well-known/oauth-protected-resource"response = requests.get( url,)print(response.status_code, response.text)package mainimport ( "fmt" "io" "net/http" "os")func main() { url := os.Getenv("CODER_URL") + "/.well-known/oauth-protected-resource" req, err := http.NewRequest(http.MethodGet, url, nil) if err != nil { panic(err) } resp, err := http.DefaultClient.Do(req) if err != nil { panic(err) } defer resp.Body.Close() out, err := io.ReadAll(resp.Body) if err != nil { panic(err) } fmt.Println(resp.Status, string(out))}Example Response200
{ "authorization_servers": [ "string" ], "bearer_methods_supported": [ "string" ], "resource": "string", "scopes_supported": [ "string" ]}