Oauth
1 operations under oauth. Examples read $API and $KEY from your shell.
POST /v1/oauth/token
Send an Idempotency-Key header on every POST so a retry never repeats the request.
Request body
application/json, required
object
grant_typestring optionalclient_assertion_typestring optionalclient_assertionstring optionalscopestring optional
Responses
200 Default Response
object
access_tokenstring requiredtoken_typestring required one ofBearerexpires_ininteger requiredscopestring required
Errors are RFC 9457 problem documents (application/problem+json).
curl
curl -s \
-X POST \
"$API/v1/oauth/token" \
-H "authorization: Bearer $KEY" \
-H "idempotency-key: $(uuidgen)" \
-H "content-type: application/json" \
-d '{}'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/token", {
body: {},
});