You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.
Forum Discussion
Ghislain Sommervogel
2 months agoHelpful | Level 5
.NET SDK Invalid request while calling ProcessCodeFlowAsync
Hi Team, I'm trying to setup a permanent connection (= a refreshToken process) to my app using OauthPKCE. For this, I'm using the sample code provided here: https://github.com/dropbox/dropbox-sdk-d...
- 2 months ago
If you're using the PKCE flow, the client secret shouldn't be required, so based on this error it looks like you're not actually in a PKCE flow.
Have you modified the OAuthPKCE sample code? I just tried it as is (just plugging in an app key) and it is working for me.
Can you confirm you set up the OAuthFlow object as a PKCEOAuthFlow as shown here and that the redirectUri you are passing in to ProcessCodeFlowAsync comes from the same flow started with the same object? (This error would occur if the authorization code you are exchanging wasn't actually retrieved using PKCE.)
Greg-DB
2 months agoDropbox Staff
If you're using the PKCE flow, the client secret shouldn't be required, so based on this error it looks like you're not actually in a PKCE flow.
Have you modified the OAuthPKCE sample code? I just tried it as is (just plugging in an app key) and it is working for me.
Can you confirm you set up the OAuthFlow object as a PKCEOAuthFlow as shown here and that the redirectUri you are passing in to ProcessCodeFlowAsync comes from the same flow started with the same object? (This error would occur if the authorization code you are exchanging wasn't actually retrieved using PKCE.)
- Ghislain Sommervogel2 months agoHelpful | Level 5
Hello Greg,
Thanks for leading me to the solution. I didn't use the sample code "as is" because I had to adapt a preexisting code. The mistake was to call the GetAuthorizeUri function of DropboxOAuth2Helper instead of PKCEOAuthFlow.
Best regards,
Ghislain
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,882 PostsLatest Activity: 3 years agoIf you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!