Last night I fetched some data using the below GET request
const result = await axios({
method: 'get',
url: `https://tahina-test2-dev-ed.my.salesforce.com/services/data/v48.0/query?q=SELECT+Product2Id,+Product2.Name+from+Pricebookentry+WHERE+Pricebook2Id='01s2X000002X6PxQAK'`,
headers: {
Authorization:
'Bearer 00D2X000001esWS!ASAAQG1hpJDqk71EfwEsDjQEOIVpxLK6B86D8g3yhU5tlUWBtcHoZhpbCtu.kinCTNz03pmHu4xgE_WN05YihmiORJ8e01tZ'
}
});
But today I cannot fetch the same data as last night as token has expired. So my question is, is there anyway I can keep the token from expiring or getting a new token everytime it expires from my web app? I am using React JS to make this Get call if it helps.
Thank you!