Start 2025 on time and up to date. Seamlessly integrate your calendars into Dropbox with these simple steps.

Forum Discussion

PHAnetwork's avatar
PHAnetwork
Helpful | Level 5
18 days ago

Error creating shared link from API (Python)

I'm getting an error when attempting to create a shared link from a file that was just uploaded. The upload works fine, but I get the following error message.

AuthError('missing_scope', TokenScopeError(required_scope='sharing.write'))

I checked the scope through the App Console and sharing.write is checked, and sharing.read is also checked, although it it disabled.

This is consistent with another app that I have where I am able to create shared links, however, this is not a Python APP and I am using REST calls for this one.

Any idea on why I might be getting this error?

Thanks,
Bob

 

 

  • A 'missing_scope' error indicates that while the app is permitted to use that scope, the particular access token you're using to make the API call does not have that scope granted. 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 or refresh tokens.

    That being the case, to make any API calls that require that scope, you'll need to re-authorize the app to get a new access token (and refresh token, if being used) with that scope.

    Refer to the OAuth Guide and authorization documentation for more information. 

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff

    A 'missing_scope' error indicates that while the app is permitted to use that scope, the particular access token you're using to make the API call does not have that scope granted. 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 or refresh tokens.

    That being the case, to make any API calls that require that scope, you'll need to re-authorize the app to get a new access token (and refresh token, if being used) with that scope.

    Refer to the OAuth Guide and authorization documentation for more information. 

    • PHAnetwork's avatar
      PHAnetwork
      Helpful | Level 5

      Okay, thanks Greg, that does make sense. I had created the token BEFORE I changed the scope. Getting a new token did the trick.

      Thanks again for you help! You can mark this question as resolved.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,927 PostsLatest Activity: 5 days ago
338 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!