Search code examples
pythondjangopaypalpaypal-rest-sdk

Stop paypal access token from refreshing so frequently


Straight forward and simple question;

What is the best way to stop PayPal access token from refreshing so frequently?

I have tried to do curl command with extended 'expires_in': command. Doesn't work. Still refreshes after 24hr


Solution

  • Access tokens are temporary and usually refresh after 9 hours. They can be cached for that period of time (the response will have an expires_in), but apart from that you need to requet a new one as soon as the one you have is set to expire.

    This is by design and intended. There is no way to change it.