In your code you retrieve the token using the client_credentials grant. You also suggest to store that token for later use, which is very good.
In case that stored token once dies, there is a refresh token you can use to get a new token easily. That is OAuth2 standard. Maybe you could implement something to help people accomplish that? Of course it depends on how the token was stored...
I could think of many people not storing the token and creating a new on each API call...
Also: you would never have to care about the token anymore, as that refresh process can run automated.
For any help on that topic, see the official cleverreach documentation
In your code you retrieve the token using the client_credentials grant. You also suggest to store that token for later use, which is very good.
In case that stored token once dies, there is a refresh token you can use to get a new token easily. That is OAuth2 standard. Maybe you could implement something to help people accomplish that? Of course it depends on how the token was stored...
I could think of many people not storing the token and creating a new on each API call...
Also: you would never have to care about the token anymore, as that refresh process can run automated.
For any help on that topic, see the official cleverreach documentation