How long does a LIVE access token last?

John4242
Contributor
Contributor

In the Sandbox environment, I get an access token from developer.paypal.com which lasts about 10 years and starts with "access_token$sandbox".

For the LIVE environment I can't see anything similar, but found that I can get one using REST as described here: https://www.paypal.com/de/smarthelp/article/how-do-i-get-an-access-token-ts2128

My question is, how long does that access token last? Is it just to capture one previously authorized payment? Or can I use it for 10 years?

Also, when I am still using Sandbox, can I request an access token as I would when LIVE? Or can I use the one found above? Why are there two possibilities and where are the differences documented?

Also, does anybody else find the paypal documentation unbelievably disastrously bad? I have spent MANY days trying to get this far.

 

Login to Me Too
1 REPLY 1

capmobile
Contributor
Contributor

I think the developer stuff is difficult because the sandbox environment needs work. Regarding access token lasting time if you make a request it shows an expiration of the token for access. I get around 30 secs for identity, but it might differ depending on the auth required. My guess is around 31240 ms or 31.24 seconds. 

Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.