OAuth API reference
OAuth client registration, branding, and token services.
Published contracts: @socra/oauth-api@0.0.6.
Base URL
https://oauth.socra.cloudOAuth configs
Project-level OAuth branding, audience, and publishing configuration.
Get OAuth config
GET
/v1/projects/{project_id}/configPath parameters
project_idcustomrequiredQuery parameters
No query parameters
Response
12 fields
project_idcustomrequiredapplication_namestringrequiredmin length: 1 · max length: 120support_emailstring | nullrequiredlogo_uristring | nullrequiredhomepage_uristring | nullrequiredprivacy_policy_uristring | nullrequiredterms_of_service_uristring | nullrequiredauthorized_domainsstring[]requiredaudience"internal" | "external"requiredpublishing_status"testing" | "production"requiredcreated_atcustomrequiredupdated_atcustomrequiredUpdate OAuth config
PATCH
/v1/projects/{project_id}/configPath parameters
project_idcustomrequiredRequest body
application_namestringoptionalmin length: 1 · max length: 120support_emailstring | nulloptionallogo_uristring | nulloptionalhomepage_uristring | nulloptionalprivacy_policy_uristring | nulloptionalterms_of_service_uristring | nulloptionalauthorized_domainsstring[]optionalaudience"internal" | "external"optionalResponse
12 fields
project_idcustomrequiredapplication_namestringrequiredmin length: 1 · max length: 120support_emailstring | nullrequiredlogo_uristring | nullrequiredhomepage_uristring | nullrequiredprivacy_policy_uristring | nullrequiredterms_of_service_uristring | nullrequiredauthorized_domainsstring[]requiredaudience"internal" | "external"requiredpublishing_status"testing" | "production"requiredcreated_atcustomrequiredupdated_atcustomrequiredOAuth clients
A runtime-specific OAuth client registration owned by a project config.
Create OAuth client
POST
/v1/projects/{project_id}/clientsPath parameters
project_idcustomrequiredRequest body
namestringrequiredmin length: 1 · max length: 120type"web" | "spa" | "native"requiredredirect_urisstring[]optionaldefault: [] · max items: 100javascript_originsstring[]optionaldefault: [] · max items: 100Response
9 fields
idcustomrequiredproject_idcustomrequirednamestringrequiredmin length: 1 · max length: 120type"web" | "spa" | "native"requiredredirect_urisstring[]requiredmax items: 100javascript_originsstring[]requiredmax items: 100status"active" | "suspended"requiredcreated_atcustomrequiredupdated_atcustomrequiredList OAuth clients
GET
/v1/projects/{project_id}/clientsPath parameters
project_idcustomrequiredQuery parameters
limitintegeroptionalmin: 1 · max: 100afterstringoptionalResponse
2 fields
dataobject[]required
dataobject[]requiredidcustomrequiredproject_idcustomrequirednamestringrequiredmin length: 1 · max length: 120type"web" | "spa" | "native"requiredredirect_urisstring[]requiredmax items: 100javascript_originsstring[]requiredmax items: 100status"active" | "suspended"requiredcreated_atcustomrequiredupdated_atcustomrequiredhas_morebooleanrequiredGet OAuth client
GET
/v1/projects/{project_id}/clients/{client_id}Path parameters
project_idcustomrequiredclient_idcustomrequiredQuery parameters
No query parameters
Response
9 fields
idcustomrequiredproject_idcustomrequirednamestringrequiredmin length: 1 · max length: 120type"web" | "spa" | "native"requiredredirect_urisstring[]requiredmax items: 100javascript_originsstring[]requiredmax items: 100status"active" | "suspended"requiredcreated_atcustomrequiredupdated_atcustomrequiredUpdate OAuth client
PATCH
/v1/projects/{project_id}/clients/{client_id}Path parameters
project_idcustomrequiredclient_idcustomrequiredRequest body
namestringoptionalmin length: 1 · max length: 120redirect_urisstring[]optionalmax items: 100javascript_originsstring[]optionalmax items: 100status"active" | "suspended"optionalResponse
9 fields
idcustomrequiredproject_idcustomrequirednamestringrequiredmin length: 1 · max length: 120type"web" | "spa" | "native"requiredredirect_urisstring[]requiredmax items: 100javascript_originsstring[]requiredmax items: 100status"active" | "suspended"requiredcreated_atcustomrequiredupdated_atcustomrequiredDelete OAuth client
DELETE
/v1/projects/{project_id}/clients/{client_id}Path parameters
project_idcustomrequiredclient_idcustomrequiredQuery 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}/secretsPath parameters
project_idcustomrequiredclient_idcustomrequiredRequest body
No request body
Response
5 fields
idcustomrequiredclient_idcustomrequiredsecret_hintstringrequiredcreated_atcustomrequiredsecretstringrequiredList client secrets
GET
/v1/projects/{project_id}/clients/{client_id}/secretsPath parameters
project_idcustomrequiredclient_idcustomrequiredQuery parameters
No query parameters
Response
2 fields
dataobject[]required
dataobject[]requiredidcustomrequiredclient_idcustomrequiredsecret_hintstringrequiredcreated_atcustomrequiredhas_morebooleanrequiredDelete client secret
DELETE
/v1/projects/{project_id}/clients/{client_id}/secrets/{secret_id}Path parameters
project_idcustomrequiredclient_idcustomrequiredsecret_idcustomrequiredQuery 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/installationsRequest body
project_idcustomrequiredscopesstring[]optionaldefault: [] · max items: 100Response
11 fields
idcustomrequiredproject_idcustomrequiredaccount_idstringrequiredprincipal_idstring | nullrequiredapplication_namestringrequiredscopesstring[]requiredstatus"pending" | "active" | "revoked"requiredauthorized_by_idstringrequiredauthorized_atcustomrequiredcreated_atcustomrequiredrevoked_atcustom | nullrequiredGet installation
GET
/v1/installations/{installation_id}Path parameters
installation_idcustomrequiredQuery parameters
No query parameters
Response
11 fields
idcustomrequiredproject_idcustomrequiredaccount_idstringrequiredprincipal_idstring | nullrequiredapplication_namestringrequiredscopesstring[]requiredstatus"pending" | "active" | "revoked"requiredauthorized_by_idstringrequiredauthorized_atcustomrequiredcreated_atcustomrequiredrevoked_atcustom | nullrequiredList installations
GET
/v1/installationsQuery parameters
limitintegeroptionalmin: 1 · max: 100afterstringoptionalResponse
2 fields
dataobject[]required
dataobject[]requiredidcustomrequiredproject_idcustomrequiredaccount_idstringrequiredprincipal_idstring | nullrequiredapplication_namestringrequiredscopesstring[]requiredstatus"pending" | "active" | "revoked"requiredauthorized_by_idstringrequiredauthorized_atcustomrequiredcreated_atcustomrequiredrevoked_atcustom | nullrequiredhas_morebooleanrequiredRevoke installation
DELETE
/v1/installations/{installation_id}Path parameters
installation_idcustomrequiredQuery parameters
No query parameters
Response
No response body