跳到主要内容

saveAuthKeys

BooleanWrapper saveAuthKeys(SaveAuthKeysRequestDto)

POST /api/2.0/settings/authservice

Save the authorization keys

Saves the authorization keys for one third-party storage or authorization provider, identified by name, or clears them when every submitted key is left empty. Requires Owner or DocSpaceAdmin (the EditPortalSettings permission); a provider that does not allow its keys to be changed from the API rejects the call outright. A provider that is only available on a paid plan additionally requires the portal's tariff to include third-party storage, or Standalone licensing, before the call is accepted. Keys that fail the provider's own validation are cleared and the call is rejected rather than left partially applied. This is a mutating, idempotent call: resaving identical keys succeeds and reports no change. It returns whether the keys actually changed, not the keys themselves; connecting Telegram or an external database through this call also triggers the matching real-time connection update.

Parameters​

NameInTypeDescriptionNotes
SaveAuthKeysRequestDtobodySaveAuthKeysRequestDto[optional]

Responses​

Status codeDescriptionTypeResponse headers
200Whether the provider's keys actually changedBooleanWrapperX-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
400The request body cannot be read or has no name or props, a key has no name or value or a value longer than 4000 characters, or the submitted keys failed the provider's own validation--
402The provider is a paid option not covered by the portal's current pricing plan--
403The caller has no portal-settings right, or the provider is unknown or its keys cannot be set--
401UnauthorizedErrorApiResponse-
429Too Many Requests.ErrorApiResponseRetry-After
500Internal Server Error.ErrorApiResponse-
502Bad Gateway. Returned by the reverse proxy, response body may be HTML and not JSON.--
503Service Unavailable. Returned by the reverse proxy, response body may be HTML and not JSON.--

Return type​

BooleanWrapper

Authorization​

Basic, OAuth2 (scopes: read, write), ApiKeyBearer, asc_auth_key, Bearer, OpenId

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json