box-python-sdk icon indicating copy to clipboard operation
box-python-sdk copied to clipboard

About the expiration of OAuth2

Open c-rei opened this issue 5 years ago • 2 comments

Dear Sir: I have a question about the expiration of OAuth2. I make a authorization with Traditional 3-Legged OAuth2 just like your example, I run a long processing over one hour after authorized, so I want to known do I must refresh my access token in every hour when I continue to run a long processing? And how can I to check the expiration of my access token?

Thanks your any response.

c-rei avatar Dec 11 '20 00:12 c-rei

@c-rei If you are simply trying to create a script making API calls, I recommend using JWT authentication. The SDK will automatically refresh the token. Information on how to setup your app to use JWT can be found here. Once that is done, you have the Python SDK use JWT by following the instructions here.

sujaygarlanka avatar Jan 11 '21 21:01 sujaygarlanka

Sir,

thanks for your response.

I have to use OAuth2 authorization for our customs in my applications, I just worry when they run a long processing, an access token will be expire on the way. So I want to known what can I to do to avoid it?

c-rei avatar Jan 12 '21 04:01 c-rei

This issue has been automatically marked as stale because it has not been updated in the last 30 days. It will be closed if no further activity occurs within the next 7 days. Feel free to reach out or mention Box SDK team member for further help and resources if they are needed.

stale[bot] avatar Dec 19 '22 20:12 stale[bot]

This issue has been automatically closed due to maximum period of being stale. Thank you for your contribution to Box Python SDK and feel free to open another PR/issue at any time.

stale[bot] avatar Dec 27 '22 06:12 stale[bot]