We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
donatz
7 years agoExplorer | Level 3
Best way to authorize more users on my app
Hi all, my scenario is as follows: 1) mobile app 2) app server for redirect uri I need to allow users to access their dropbox space from my application. So each user will have to authorize his co...
Greg-DB
Dropbox Community Moderator
7 years agoI'm not sure I follow. What do you mean by "accessID"?
Also, can you clarify what you mean when you say " field state is filled correctly but I don't have the code because it is hidden"?
Please note that I'm happy to help with any questions or issues you have with the Dropbox API itself, but I can't offer general security guidance. If you have any app security questions, please consult with a security professional.
donatz
7 years agoExplorer | Level 3
Greg-DB ha scritto:I'm not sure I follow. What do you mean by "accessID"?
Sorry I mean accound_id and not accessID
Greg-DB ha scritto:Also, can you clarify what you mean when you say " field state is filled correctly but I don't have the code because it is hidden"?
If in my call I use the field state, the callback does not return the code field but only the state returns to the parameters. How is it possible?ù
Thanks for you help
- Greg-DB7 years ago
Dropbox Community Moderator
The account_id returned by /oauth2/token is the account ID of the Dropbox account that was signed in and authorized the app, resulting in the authorization code that was used. Dropbox can't attest to the ID of the user in your app that was signed in to your app at the time. You'll need to manage that in your app's session code.
Also, the state and code values are getting returned as expected for me. I just tried this /oauth2/authorize URL (using a redirect URI hosted on Dropbox itself as an example):
Upon authorizing the app, it redirected me to the redirect URL:
That contains the expected state value, as well as an authorization code.
If something isn't working as expected, please share the steps/code to reproduce the issue, and the error or unexpected output.
- Anonymous Guy5 years agoNew member | Level 2
You can use ?client_id=someid&state={base_encode('user_id')}, just put user_id, or some unique value to the state query param, and Dropbox will return you response as {code: "Some Code", state: 2}, where 2 - is User ID, as an example
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!