Feature Request: Daraja Token store
manuelgeek opened this issue · 0 comments
manuelgeek commented
Is your feature request related to a problem? Please describe.
The Daraja API access_token
stays active for 1 Hour. Currently we still generate a new access token for every request, which is expensive. There's need to keep the access_token as long as it's still valid.
Describe the solution you'd like
Storing the token in a state with the GenServer
Work Involved
Getting the token
, time
, storing it in the state
, getting the token against time, generate new one if token is older than 1 Hour