You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.
Forum Discussion
vinke
3 years agoExplorer | Level 4
/sharing/create_shared_link_with_settings unauthorized
Hello,
im trying to create a shared link with /sharing/create_shared_link_with_settings. Despite having the sharing.write set to my App, i get unauthorized all the time.
What am i missing...
- 3 years ago
vinke Please print out the response body, as it should contain a more useful error message.
While access tokens can be used to access multiple different endpoints, different endpoints do require different scopes, so it's possible that an access token can access one endpoint but not another.
Also, be aware that just adding a scope to your app via the App Console does not retroactively grant that scope to existing access tokens. That being the case, to make any API calls that require that scope, you'll need to get a new access token with that scope. For example, if the access token you're using was not originally created with the "sharing.write" scope, just enabling the "sharing.write" scope on the app itself will not automatically add "sharing.write" to that particular access token, so you'd need to get a new access token for that.
vinke
Explorer | Level 4
does the access token for this endpoint differ?
I am using the generated one from the App which is working fine for the endpoint /files/search_v2 for example.
I am not using an SDK, i am using symfony (PHP) and im using the HttpClientInterface to send the request.
As said, its working for the endpoint /files/search_v2 without any problems.
Response:
HTTP/1.1 401 Unauthorized returned for "https://api.dropboxapi.com/2/sharing/create_shared_link_with_settings"
Same headers set as for /files/search_v2 which is working fine
Здравко
3 years agoLegendary | Level 20
vinke wrote:does the access token for this endpoint differ?
I am using the generated one from the App which is working fine for the endpoint /files/search_v2 for example.
...
No, the access token could be used for all regular API calls (wherever needed). Is you are using the same token? Only you know this!
vinke wrote:...
Response:HTTP/1.1 401 Unauthorized returned for "https://api.dropboxapi.com/2/sharing/create_shared_link_with_settings"
...
The above is not a body!!! This is first line of the response, actually (far from the body).
ADD: Try the call here with the same token. You can easy get the body out from response field. 😉
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,910 PostsLatest Activity: 3 days agoIf 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!