Machine Api Access Token granted once but not again
I am using NextJS, and I make a request like this below
And I get the correct access_token
I then eventually make a request to google and get a url for google drive auth I redirect to it and come back to my app with a session ID
I then in a different route run the same request as above to get a access_token again
so that I can get a token from google drive with the session ID
however I get the following error
Not sure why it didnt worked the second time and did the first. I was under the assumption that this machine api access token shouldnt be stored but called when needed.
3 Replies
I get this for the response
I figured this out this can be closed
Hey, do you mind sharing how you resolved your issue please ?
Oh Yes, I had to implement storage of the access token in my db with a expiry date and check for the expiry date and if it is expired run the request again if it is not expired use the same accesss token. Hope that helps. @IkiTg07