Oauth clients
5 operations under oauth-clients. Examples read $API and $KEY from your shell.
- GET /v1/oauth-clients
- POST /v1/oauth-clients
- GET /v1/oauth-clients/{id}
- PATCH /v1/oauth-clients/{id}
- POST /v1/oauth-clients/{id}/revoke
GET /v1/oauth-clients
Parameters
limitinteger optional in querystarting_afterstring optional in query
Responses
200 Default Response
object
dataarray requiredEach item:
idstring requirednamestring requiredscopesarray of string requiredjwksobject requiredkeysarray requiredEach item:
kidstring requiredktystring requiredcrvstring requiredalgstring requiredxstring requiredystring optional
token_endpoint_auth_methodstring required one ofprivate_key_jwtallowed_ipsarray of string requiredcreated_atstring requiredrevoked_atstring required (nullable)
has_moreboolean required
Errors are RFC 9457 problem documents (application/problem+json).
curl
curl -s \
"$API/v1/oauth-clients" \
-H "authorization: Bearer $KEY"SDK
import { createScrClient } from "@scr/sdk";
// The client sends the API key for you.
const client = createScrClient({ baseUrl: process.env.API!, apiKey: process.env.KEY! });
const { data, error } = await client.GET("/v1/oauth-clients");POST /v1/oauth-clients
Send an Idempotency-Key header on every POST so a retry never repeats the request.
Request body
application/json, required
object
namestring requiredscopesarray of string requiredjwksobject requiredkeysarray of object required
allowed_ipsarray of string optional
Responses
201 Default Response
object
idstring requirednamestring requiredscopesarray of string requiredjwksobject requiredkeysarray requiredEach item:
kidstring requiredktystring requiredcrvstring requiredalgstring requiredxstring requiredystring optional
token_endpoint_auth_methodstring required one ofprivate_key_jwtallowed_ipsarray of string requiredcreated_atstring requiredrevoked_atstring required (nullable)
Errors are RFC 9457 problem documents (application/problem+json).
curl
curl -s \
-X POST \
"$API/v1/oauth-clients" \
-H "authorization: Bearer $KEY" \
-H "idempotency-key: $(uuidgen)" \
-H "content-type: application/json" \
-d '{"name":"<name>","scopes":[],"jwks":{"keys":[]}}'SDK
import { createScrClient } from "@scr/sdk";
// The client sends the API key and an Idempotency-Key for you.
const client = createScrClient({ baseUrl: process.env.API!, apiKey: process.env.KEY! });
const { data, error } = await client.POST("/v1/oauth-clients", {
body: {
"name": "<name>",
"scopes": [],
"jwks": {
"keys": []
}
},
});GET /v1/oauth-clients/{id}
Parameters
idstring required in path
Responses
200 Default Response
object
idstring requirednamestring requiredscopesarray of string requiredjwksobject requiredkeysarray requiredEach item:
kidstring requiredktystring requiredcrvstring requiredalgstring requiredxstring requiredystring optional
token_endpoint_auth_methodstring required one ofprivate_key_jwtallowed_ipsarray of string requiredcreated_atstring requiredrevoked_atstring required (nullable)
Errors are RFC 9457 problem documents (application/problem+json).
curl
curl -s \
"$API/v1/oauth-clients/$ID" \
-H "authorization: Bearer $KEY"SDK
import { createScrClient } from "@scr/sdk";
// The client sends the API key for you.
const client = createScrClient({ baseUrl: process.env.API!, apiKey: process.env.KEY! });
const { data, error } = await client.GET("/v1/oauth-clients/{id}", {
params: { path: { id: "<id>" } },
});PATCH /v1/oauth-clients/{id}
Parameters
idstring required in path
Request body
application/json, required
object
allowed_ipsarray of string required
Responses
200 Default Response
object
idstring requirednamestring requiredscopesarray of string requiredjwksobject requiredkeysarray requiredEach item:
kidstring requiredktystring requiredcrvstring requiredalgstring requiredxstring requiredystring optional
token_endpoint_auth_methodstring required one ofprivate_key_jwtallowed_ipsarray of string requiredcreated_atstring requiredrevoked_atstring required (nullable)
Errors are RFC 9457 problem documents (application/problem+json).
curl
curl -s \
-X PATCH \
"$API/v1/oauth-clients/$ID" \
-H "authorization: Bearer $KEY" \
-H "content-type: application/json" \
-d '{"allowed_ips":[]}'SDK
import { createScrClient } from "@scr/sdk";
// The client sends the API key for you.
const client = createScrClient({ baseUrl: process.env.API!, apiKey: process.env.KEY! });
const { data, error } = await client.PATCH("/v1/oauth-clients/{id}", {
params: { path: { id: "<id>" } },
body: {
"allowed_ips": []
},
});POST /v1/oauth-clients/{id}/revoke
Send an Idempotency-Key header on every POST so a retry never repeats the request.
Parameters
idstring required in path
Responses
200 Default Response
object
idstring requirednamestring requiredscopesarray of string requiredjwksobject requiredkeysarray requiredEach item:
kidstring requiredktystring requiredcrvstring requiredalgstring requiredxstring requiredystring optional
token_endpoint_auth_methodstring required one ofprivate_key_jwtallowed_ipsarray of string requiredcreated_atstring requiredrevoked_atstring required (nullable)
Errors are RFC 9457 problem documents (application/problem+json).
curl
curl -s \
-X POST \
"$API/v1/oauth-clients/$ID/revoke" \
-H "authorization: Bearer $KEY" \
-H "idempotency-key: $(uuidgen)"SDK
import { createScrClient } from "@scr/sdk";
// The client sends the API key and an Idempotency-Key for you.
const client = createScrClient({ baseUrl: process.env.API!, apiKey: process.env.KEY! });
const { data, error } = await client.POST("/v1/oauth-clients/{id}/revoke", {
params: { path: { id: "<id>" } },
});