Open hapicatto opened 2 years ago
Hello!
I believe your problem is with the client initialization. Since you are not using PKCE, you need to include the app_secret when you initialize the client in order for it to properly refresh.
I did try with PKCE, and I tried adding the app_secret. No luck
The next steps to debug would be to try printing off oauth_result
before the creation of the client. Assuming that there is a valid token (please do not paste results here), next step would be to paste the code that also includes the app_secret in the client initialization (just to confirm and further debug on my end)
hey @rogebrd I think i am facing the same issue, and the reason is short-lived tokens https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Tokens-only-valid-for-4-hours-from-app-console/m-p/425358/highlight/true#M22718 I believe the issue is from the dropbox console app itself which isn't generating permanent tokens
Hi @kaleb-keny,
We made a conscious decision to change the behavior of tokens from long living to short living in order to make our platform more secure. If you are running into issues with the token expiring, you will need to be using refresh tokens.
The app console gives short lived tokens as a way to quickly get on boarded to the system, this is not meant to be a permanent solution for getting tokens. It should be quickly replaced with a proper oauth flow.
Thanks, Brad
yeah that makes sense, thank you
i think their is problem in auth either you have entered wrong authorization code,etc. auth_flow command is proper , and i am using it's working properly when you get result from oauth result save refresh token and when you initialize your dropbox client give oauth_refresh_token with app key(consumer key) and app sercret (consumer secret) and if you have access token then you don't need key and secret while initializing the dropbox client
*pkce is mainly for web apps when you can't hide app_secret from source code for using it in background you shouldn't use pkce and according to dropbox it's less secure than normal auth flow
and if you want to store your app key somewhere then you can convert it in base64,etc. and then store it like in plain text file or in database,etc.
i am also new to this, so i am also learning all this by doing and experiencing the problems
I'm not making it work the SDK for renewing the authorization token, so after 4hs my apis stop working. Even the example returns error:
it returns:
I'm using a windows machine with the intel python version 3.7 as I'm using it in combination with tensorflow I've tried every possible SO post but not sure where the error can be.