Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
hhjj49
3 years agoNew member | Level 2
Malformed OAuth2 Access Token When Deployed to Vercel
So I just started using dropbox for a nextjs/react app and everything works fine exactly as it should when I run it locally, but when I deploy to vercel I get a 400 code and the 'Error in call to API...
Greg-DB
Dropbox Community Moderator
3 years agoRegardless of where/how you're performing the API call, the "The given OAuth 2 access token is malformed" error should indicate that the call failed because the access token provided in the "Authorization" header was not of the expected form. This isn't something you need to or can configure for the app on the App Console.
I suggest inspecting the actual request your deployed app is sending to the /2/files/upload endpoint to see what it is including in the "Authorization" header. I can't offer help with Vercel itself as that's not made by Dropbox, so you may need to refer to its documentation to see how you can inspect/debug it.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If 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, Facebook or Instagram.
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!