Skip to main content

ONLYOFFICE DocSpace OAuth 2.0 API

The browsable version of this reference, with a request builder and code samples, is published at https://api.onlyoffice.com/docspace/api-backend/usage-api/.

All URIs are relative to https://yourportal.onlyoffice.com, where the host is the address of your DocSpace instance.

Authorization​

MethodHTTP requestDescription
authorizeOAuthGET /oauth2/authorizeStart the authorization flow
exchangeTokenPOST /oauth2/tokenExchange the authorization code
submitConsentPOST /oauth2/authorizeSubmit the consent decision

Client Management​

MethodHTTP requestDescription
changeActivationPATCH /api/2.0/oauth2/clients/{clientId}/activationChange client activation status
createClientPOST /api/2.0/oauth2/clientsCreate a new OAuth2 client
deleteClientDELETE /api/2.0/oauth2/clients/{clientId}Delete an OAuth2 client
deleteTenantClientsDELETE /api/2.0/oauth2/clients/tenantDelete all tenant OAuth2 clients
deleteUserClientsDELETE /api/2.0/oauth2/clientsDelete all user OAuth2 clients
regenerateSecretPATCH /api/2.0/oauth2/clients/{clientId}/regenerateRegenerate client secret
revokeUserClientDELETE /api/2.0/oauth2/clients/{clientId}/revokeRevoke client consent
updateClientPUT /api/2.0/oauth2/clients/{clientId}Update an existing OAuth2 client

Client Querying​

MethodHTTP requestDescription
getClientGET /api/2.0/oauth2/clients/{clientId}Get client details
getClientInfoGET /api/2.0/oauth2/clients/{clientId}/infoGet client info
getClientsGET /api/2.0/oauth2/clientsList clients
getClientsInfoGET /api/2.0/oauth2/clients/infoList client info
getConsentsGET /api/2.0/oauth2/clients/consentsList user consents
getPublicClientInfoGET /api/2.0/oauth2/clients/{clientId}/public/infoGet public client info

Discovery​

MethodHTTP requestDescription
handleOptionsOPTIONS /.well-known/oauth-authorization-serverProbe the discovery endpoint

Scope Management​

MethodHTTP requestDescription
getScopesGET /api/2.0/oauth2/scopesList available OAuth2 scopes

Authorization​

cookieAuth​

  • Type: API key
  • API key parameter name: asc_auth_key
  • Location:

bearerAuth​

  • Type: HTTP Bearer Token authentication

asc_auth_key​

  • Type: API key
  • API key parameter name: asc_auth_key
  • Location:

Basic​

  • Type: HTTP basic authentication

Bearer​

  • Type: HTTP Bearer Token authentication (JWT)

ApiKeyBearer​

  • Type: API key
  • API key parameter name: ApiKeyBearer
  • Location: HTTP header

OAuth2​

  • Type: OAuth
  • Flow: accessCode
  • Authorization URL:
  • Scopes:
    • read: Read access to protected resources
    • write: Write access to protected resources

OpenId​

x-signature​

  • Type: API key
  • API key parameter name: x-signature
  • Location: