SalesOS

O Auth

OAuth 2.0 authorization server: authorize, token, revoke, introspect, userinfo

GET
/v1/oauth/authorize

Query Parameters

response_typestring
client_idstring
redirect_uristring
scopestring
statestring
code_challengestring
code_challenge_methodstring
noncestring
promptstring
Value in: "none" | "consent" | "login"
curl -X GET "https://api.salesos.org/v1/oauth/authorize?response_type=code&client_id=%3Cstring%3E&redirect_uri=%3Cstring%3E&scope=READ_LEADS+offline_access&state=%3Cstring%3E&code_challenge=%3Cstring%3E&code_challenge_method=S256&nonce=%3Cstring%3E&prompt=none"

Token endpoint: authorization_code (+PKCE), refresh_token, client_credentials

POST
/v1/oauth/token

Request Body

application/jsonRequired
grant_typestring
Value in: "authorization_code" | "refresh_token" | "client_credentials"
codestring
redirect_uristring
code_verifierstring
refresh_tokenstring
scopestring
client_idstring
client_secretstring
tokenstring

revoke / introspect

token_type_hintstring
Value in: "access_token" | "refresh_token"

Header Parameters

Idempotency-Keystring

Unique key (a UUID is ideal) that makes this write safe to retry for 24 hours: a retry with the same body replays the original response (Idempotent-Replayed: true); the same key with a different body is a 409.

Maximum length: 255
curl -X POST "https://api.salesos.org/v1/oauth/token" \
  -H "Idempotency-Key: <string>" \
  -H "Content-Type: application/json" \
  -d '{
    "grant_type": "authorization_code",
    "code": "string",
    "redirect_uri": "string",
    "code_verifier": "string",
    "refresh_token": "string",
    "scope": "string",
    "client_id": "string",
    "client_secret": "string",
    "token": "string",
    "token_type_hint": "access_token"
  }'

Revoke an access or refresh token (RFC 7009)

POST
/v1/oauth/revoke

Request Body

application/jsonRequired
grant_typestring
Value in: "authorization_code" | "refresh_token" | "client_credentials"
codestring
redirect_uristring
code_verifierstring
refresh_tokenstring
scopestring
client_idstring
client_secretstring
tokenstring

revoke / introspect

token_type_hintstring
Value in: "access_token" | "refresh_token"

Header Parameters

Idempotency-Keystring

Unique key (a UUID is ideal) that makes this write safe to retry for 24 hours: a retry with the same body replays the original response (Idempotent-Replayed: true); the same key with a different body is a 409.

Maximum length: 255
curl -X POST "https://api.salesos.org/v1/oauth/revoke" \
  -H "Idempotency-Key: <string>" \
  -H "Content-Type: application/json" \
  -d '{
    "grant_type": "authorization_code",
    "code": "string",
    "redirect_uri": "string",
    "code_verifier": "string",
    "refresh_token": "string",
    "scope": "string",
    "client_id": "string",
    "client_secret": "string",
    "token": "string",
    "token_type_hint": "access_token"
  }'

Introspect one of the calling client's tokens (RFC 7662)

POST
/v1/oauth/introspect

Request Body

application/jsonRequired
grant_typestring
Value in: "authorization_code" | "refresh_token" | "client_credentials"
codestring
redirect_uristring
code_verifierstring
refresh_tokenstring
scopestring
client_idstring
client_secretstring
tokenstring

revoke / introspect

token_type_hintstring
Value in: "access_token" | "refresh_token"

Header Parameters

Idempotency-Keystring

Unique key (a UUID is ideal) that makes this write safe to retry for 24 hours: a retry with the same body replays the original response (Idempotent-Replayed: true); the same key with a different body is a 409.

Maximum length: 255
curl -X POST "https://api.salesos.org/v1/oauth/introspect" \
  -H "Idempotency-Key: <string>" \
  -H "Content-Type: application/json" \
  -d '{
    "grant_type": "authorization_code",
    "code": "string",
    "redirect_uri": "string",
    "code_verifier": "string",
    "refresh_token": "string",
    "scope": "string",
    "client_id": "string",
    "client_secret": "string",
    "token": "string",
    "token_type_hint": "access_token"
  }'
curl -X GET "https://api.salesos.org/v1/oauth/userinfo"

OpenID Connect userinfo (POST form)

POST
/v1/oauth/userinfo

Header Parameters

Idempotency-Keystring

Unique key (a UUID is ideal) that makes this write safe to retry for 24 hours: a retry with the same body replays the original response (Idempotent-Replayed: true); the same key with a different body is a 409.

Maximum length: 255
curl -X POST "https://api.salesos.org/v1/oauth/userinfo" \
  -H "Idempotency-Key: <string>"
curl -X GET "https://api.salesos.org/v1/oauth/jwks"
curl -X GET "https://api.salesos.org/v1/oauth/scopes"