As Chris Bulson already said, the client credentials flow is only supported for automation APIs.
However, I've heard it will become available for direct data access as well. I've not seen any date, but it should be well before basic authentication will be deprecated. So either wave 1 or wave 2 this year.
At this moment your only option is the authorization code grant flow or device code flow. Resource owner password flow also works, but that's not a very secure alternative.
I would recommend to use basic authentication for now, which is more secure compared to resource owner password flow, but it doesn't require any user interaction. Switch to client credentials flow when it becomes available. That way you don't waste time on implementing a flow that you need to change again in the not so far future.