If you use the SDK, you can use the method getErrors() from the class onOfficeSDK.php to get the error messages.

If an error occurs while processing an onOffice API request, the onOffice API response changes as follows:

  • Status code has value …
    • 400 „not authenticated“:
      • Request was made without a valid token.
      • User authentication is not valid.
    • 500 „server error“
      • General error when preparing or processing the request.
  • Attribute „errorcode“ contains the numerical error code.
    • Error “97” indicates an error in the processing of the action.
    • Other errors indicate invalid JSON or an invalid request structure.
  • Attribute „message“ contains an error message.