Forum Discussion

FALSHER's avatar
FALSHER
New member | Level 2
5 years ago
Solved

How to add a user to an application in development?

I want to test the developed application on another account. I get the access token using the method "/oauth2/authorize?client_id=*****&response_type=code". As a result, I get a key that is different in length from the one that I generated in the app console, in addition, when I execute any request in the dropbox, I get a 401 Unauthorized status

  • I was able to solve my problem myself. For authorization using the Bearer method, you need exactly the same long access token that can be obtained with response_type=token

2 Replies

  • FALSHER's avatar
    FALSHER
    New member | Level 2
    5 years ago

    I was able to solve my problem myself. For authorization using the Bearer method, you need exactly the same long access token that can be obtained with response_type=token

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    5 years ago

    Yes, when using 'response_type=code', you'll get back an "authorization code", not an "access token". You can exchange the authorization code for an access token by calling /oauth2/token.

     

    When using 'response_type=token', you'll get back an access token directly.

     

    The 'response_type=token' flow is no longer recommended though. It's best to use 'response_type=code' for server-side apps, and 'response_type=code' with PKCE for client-side apps.

     

    You can find more information in the OAuth Guide and authorization documentation.

About Dropbox API Support & Feedback

Node avatar for 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!