Cut the Clutter: Test Ignore Files Feature - sign up to become a beta tester here.

Forum Discussion

springyulei's avatar
springyulei
New member | Level 2
9 years ago

Error Expecting "Bearer <oauth2-access-token>

status: 400,
error: 'Error in call to API function "files/list_folder": Invalid authorization value in HTTP header "Authorization": "Bearer [object Object]". Expecting "Bearer <oauth2-access-token>".',

 

Hi, I am getting this error after I use dropbox-sdk-js with passing the accessToken I got by using npm package ''passport-dropbox-oauth2" to authorize my dropbox app.

 

 

I could be able authorize my app:

 

 

2 Replies

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    9 years ago
    Based on the error you shared, it seems you're passing in some JavaScript object instead of a string for the access token.

    I can't offer help with passport-dropbox-oauth2 itself, as it's made by a third party, but can you share the code snippet(s) where you supply the access token?

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.6,039 PostsLatest Activity: 9 hours ago
415 Following

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 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!