Get-token and Refresh-token in REST request

Get-token and Refresh-token in REST request

Hello, 

I would like to call an endpoint (url with a head like X-Token: XXXXX)

But before we need to get a token

To get the token we need to call an endpoint
with key/secret params
and that returns a token

Then we should use the token in the REST request int he header as we see before
Every 24h, we have to refresh 


What I see in the UI, it's not possible to have this behavior
Can you confirm or help me to achieve this goal?