We are attempting to use the POST /api/2.2/jobs/run-now endpoint using oAuth 2.0 Client Credentials authentication.
We are finding that when sending a request with an expired token, we receive a HTTP code of 400. This contradicts the documentation on these codes, see link below. When sending an invalid token format we receive 401, however when sending a valid format but expired token, we receive a 400. According to the documentation we'd expect this to be the other way around.
https://docs.databricks.com/api/workspace/jobs/runnow
This is critical for us because the platform we use to connect (Appian) required a 401 response in order to request a new token.