Skip to content

How to fetch and store external api access token in magento2

I am trying to integrate my external API in my magento 2.4.6 instance.

I Used Guzzlehttp to make and fetch the data and handle the request.

The problem is, The api uses token based authentication system.

My question is that I want to store the Access token somewhere, that I dont want to regenerate for each call. Where can I store it?

or else any other mechanisms are expected.