Skip to content
Cloud
Docs

OAuth API reference

OAuth client registration, branding, and token services.

Published contracts: @socra/oauth-api@0.0.6.

Base URL

https://oauth.socra.cloud

OAuth configs

Project-level OAuth branding, audience, and publishing configuration.

Get OAuth config

GET/v1/projects/{project_id}/config

Path parameters

project_idcustomrequired

Query parameters

No query parameters

Response

12 fields

project_idcustomrequired
application_namestringrequired
min length: 1 · max length: 120
support_emailstring | nullrequired
logo_uristring | nullrequired
homepage_uristring | nullrequired
privacy_policy_uristring | nullrequired
terms_of_service_uristring | nullrequired
authorized_domainsstring[]required
audience"internal" | "external"required
publishing_status"testing" | "production"required
created_atcustomrequired
updated_atcustomrequired

Update OAuth config

PATCH/v1/projects/{project_id}/config

Path parameters

project_idcustomrequired

Request body

application_namestringoptional
min length: 1 · max length: 120
support_emailstring | nulloptional
logo_uristring | nulloptional
homepage_uristring | nulloptional
privacy_policy_uristring | nulloptional
terms_of_service_uristring | nulloptional
authorized_domainsstring[]optional
audience"internal" | "external"optional

Response

12 fields

project_idcustomrequired
application_namestringrequired
min length: 1 · max length: 120
support_emailstring | nullrequired
logo_uristring | nullrequired
homepage_uristring | nullrequired
privacy_policy_uristring | nullrequired
terms_of_service_uristring | nullrequired
authorized_domainsstring[]required
audience"internal" | "external"required
publishing_status"testing" | "production"required
created_atcustomrequired
updated_atcustomrequired

OAuth clients

A runtime-specific OAuth client registration owned by a project config.

Create OAuth client

POST/v1/projects/{project_id}/clients

Path parameters

project_idcustomrequired

Request body

namestringrequired
min length: 1 · max length: 120
type"web" | "spa" | "native"required
redirect_urisstring[]optional
default: [] · max items: 100
javascript_originsstring[]optional
default: [] · max items: 100

Response

9 fields

idcustomrequired
project_idcustomrequired
namestringrequired
min length: 1 · max length: 120
type"web" | "spa" | "native"required
redirect_urisstring[]required
max items: 100
javascript_originsstring[]required
max items: 100
status"active" | "suspended"required
created_atcustomrequired
updated_atcustomrequired

List OAuth clients

GET/v1/projects/{project_id}/clients

Path parameters

project_idcustomrequired

Query parameters

limitintegeroptional
min: 1 · max: 100
afterstringoptional

Response

2 fields

dataobject[]required
idcustomrequired
project_idcustomrequired
namestringrequired
min length: 1 · max length: 120
type"web" | "spa" | "native"required
redirect_urisstring[]required
max items: 100
javascript_originsstring[]required
max items: 100
status"active" | "suspended"required
created_atcustomrequired
updated_atcustomrequired
has_morebooleanrequired

Get OAuth client

GET/v1/projects/{project_id}/clients/{client_id}

Path parameters

project_idcustomrequired
client_idcustomrequired

Query parameters

No query parameters

Response

9 fields

idcustomrequired
project_idcustomrequired
namestringrequired
min length: 1 · max length: 120
type"web" | "spa" | "native"required
redirect_urisstring[]required
max items: 100
javascript_originsstring[]required
max items: 100
status"active" | "suspended"required
created_atcustomrequired
updated_atcustomrequired

Update OAuth client

PATCH/v1/projects/{project_id}/clients/{client_id}

Path parameters

project_idcustomrequired
client_idcustomrequired

Request body

namestringoptional
min length: 1 · max length: 120
redirect_urisstring[]optional
max items: 100
javascript_originsstring[]optional
max items: 100
status"active" | "suspended"optional

Response

9 fields

idcustomrequired
project_idcustomrequired
namestringrequired
min length: 1 · max length: 120
type"web" | "spa" | "native"required
redirect_urisstring[]required
max items: 100
javascript_originsstring[]required
max items: 100
status"active" | "suspended"required
created_atcustomrequired
updated_atcustomrequired

Delete OAuth client

DELETE/v1/projects/{project_id}/clients/{client_id}

Path parameters

project_idcustomrequired
client_idcustomrequired

Query parameters

No query parameters

Response

No response body

Client secrets

A hashed OAuth client credential. Plaintext is returned only when created.

Create client secret

POST/v1/projects/{project_id}/clients/{client_id}/secrets

Path parameters

project_idcustomrequired
client_idcustomrequired

Request body

No request body

Response

5 fields

idcustomrequired
client_idcustomrequired
secret_hintstringrequired
created_atcustomrequired
secretstringrequired

List client secrets

GET/v1/projects/{project_id}/clients/{client_id}/secrets

Path parameters

project_idcustomrequired
client_idcustomrequired

Query parameters

No query parameters

Response

2 fields

dataobject[]required
idcustomrequired
client_idcustomrequired
secret_hintstringrequired
created_atcustomrequired
has_morebooleanrequired

Delete client secret

DELETE/v1/projects/{project_id}/clients/{client_id}/secrets/{secret_id}

Path parameters

project_idcustomrequired
client_idcustomrequired
secret_idcustomrequired

Query parameters

No query parameters

Response

No response body

Installations

Account-owner consent for a project to act as its own local principal.

Consent to an installation

POST/v1/installations

Request body

project_idcustomrequired
scopesstring[]optional
default: [] · max items: 100

Response

11 fields

idcustomrequired
project_idcustomrequired
account_idstringrequired
principal_idstring | nullrequired
application_namestringrequired
scopesstring[]required
status"pending" | "active" | "revoked"required
authorized_by_idstringrequired
authorized_atcustomrequired
created_atcustomrequired
revoked_atcustom | nullrequired

Get installation

GET/v1/installations/{installation_id}

Path parameters

installation_idcustomrequired

Query parameters

No query parameters

Response

11 fields

idcustomrequired
project_idcustomrequired
account_idstringrequired
principal_idstring | nullrequired
application_namestringrequired
scopesstring[]required
status"pending" | "active" | "revoked"required
authorized_by_idstringrequired
authorized_atcustomrequired
created_atcustomrequired
revoked_atcustom | nullrequired

List installations

GET/v1/installations

Query parameters

limitintegeroptional
min: 1 · max: 100
afterstringoptional

Response

2 fields

dataobject[]required
idcustomrequired
project_idcustomrequired
account_idstringrequired
principal_idstring | nullrequired
application_namestringrequired
scopesstring[]required
status"pending" | "active" | "revoked"required
authorized_by_idstringrequired
authorized_atcustomrequired
created_atcustomrequired
revoked_atcustom | nullrequired
has_morebooleanrequired

Revoke installation

DELETE/v1/installations/{installation_id}

Path parameters

installation_idcustomrequired

Query parameters

No query parameters

Response

No response body