Forum Discussion

Ashwath's avatar
Ashwath
New member | Level 2
5 years ago

Re: Dropbox V2 APIs

Hey,

So I have been looking into app authentication which can be found here.

I was able to hit the APIs by using the Bearer token(OAuth token). But when I try the basic authentication using the App token base64(app_key:app_secret) in the header, I get the following error.
 
Error in call to API function "file_requests/list:2": Invalid authorization value in HTTP header "Authorization": "Basic BASE64_ENCODED_STRING". Expecting "Bearer <oauth2-access-token>".
 
Where am I going wrong?
 
Thanks in advance
 
 
 
  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff

    The Dropbox API uses a few different auth types, as you linked to, but each particular endpoint only supports a particular set of auth types. You can see which auth type(s) any particular endpoint supports in the documentation for that endpoint, under the "AUTHENTICATION" section.

     

    For example, for /2/file_requests/list_v2, only User Authentication is supported, not App Authentication. That being the case, it won't work if you send up a "Basic" value with the app key/secret. You need to send up a "Bearer" value being the access token for the user account for which you want to list the file requests.

     

     

About Dropbox API Support & Feedback

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

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!