One month down in 2025: How are your resolutions coming along? Check out how to get back on track here.
Forum Discussion
MathanKumar
7 years agoExplorer | Level 4
getting access token via api in unity
Hi i want to get access token via api in unity with UnityWebRequest method.
"https://www.dropbox.com/1/oauth2/authorize?response_type=token&redirect_uri={1}&client_id={0}" how can i get access token using this url in unity.
- Greg-DB
Dropbox Staff
I recommend first reading the OAuth guide to see how the OAuth app authorization flow works:
https://www.dropbox.com/developers/reference/oauth-guide
The /oauth2/authorize address is a web page, not an API call. You should send the user there in their browser, where they'll be prompted to chooser whether or not to authorize your app.
When using /oauth2/authorize with the "token" flow (i.e., with `response_type=token`), the access token is returned to the redirect URI you specify (via the `redirect_uri` parameter value you supply) on the URL fragment. You should specify a redirect URI that is accessible to your app, so your app can then pull the access token from the URL fragment.
We don't have any resources, e.g., code samples, for Unity in particular, but you can find the full documentation for the OAuth app authorization flow here:
https://www.dropbox.com/developers/documentation/http/documentation#authorization- MathanKumarExplorer | Level 4
without browser or web browser control it is possible to get access token ?
- Greg-DB
Dropbox Staff
No, the OAuth app authorization flow requires a browser. You can store and re-use the resulting access token after the fact though.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,948 PostsLatest Activity: 6 hours ago
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!