Creating access token using the client credentials (RESTful)

Hi

I’m trying to call and API using RESTful which requires authentication using an access token. This token is only valid for 30 minutes and can be refreshed using client credentials.
I however have no idea on how to configure this in Home Assistant and I hope someone can guide me to a good how-to.

Thanks