Want to know more about Dash? Check out how Amy uses Dropbox and Dash to make her day easier here! 

Forum Discussion

REL_IT's avatar
REL_IT
Explorer | Level 3
2 years ago

500 on Approving Request Access to Shared link with invite only option

Hi,

 

I have a folder A which is created programmatically in Dropbox by a user A using my application. (Dropbox SDK )

Now if i create a link via using the rectangular icon with arrow with Invite only permission and can view privilege. Now when the user clicks request access button shown when clicking on the link Iam getting a Approve request. SO from my Dropbox web app im approving the request and facing a 500 error. Screenshot attached

 

10 Replies

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

    REL_IT Dropbox itself does not add a "tmp" folder in your Dropbox paths. When uploading via the Dropbox API, the third party app specifies the desired destination path via the "path" parameter that it sends to the API. If you're seeing unexpected path components, please check the "path" parameter that your app is sending.

     

    And if you're seeing any unexpected errors from the Dropbox API, I'll be happy to help, but I'd need some more information. In that case, please reply with:

    • the name and version number of the platform and SDK/library you are using, if any
    • the steps to reproduce the issue, including relevant code snippet(s), but don't include any access or refresh token(s)
    • the full text of any error or unexpected output
  • REL_IT's avatar
    REL_IT
    Explorer | Level 3
    2 years ago

    Hey Greg-DB , Thanks.

     

    But i have a problem now , Im seeing folders named tmp which are being available in the actula destination path. And some proofs are inside the tmp instead of the actual folder.

     

    I can also see error messages like Exception in moving files.

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

    REL_IT Dropbox refresh tokens don't expire automatically, so you should store and re-use them. If you didn't store your refresh token, you'll need to process the authorization flow again to get another one.

     

    For reference, Dropbox is no longer offering the option for creating new long-lived access tokens. Dropbox is now issuing short-lived access tokens (and optional refresh tokens) instead of long-lived access tokens. You can find more information on this migration here. Apps can still get long-term access by requesting "offline" access though, in which case the app receives a "refresh token" that can be used to retrieve new short-lived access tokens as needed, without further manual user intervention. Refresh tokens do not expire automatically and can be used repeatedly. You can find more information in the OAuth Guide and authorization documentation. There's a basic outline of processing this flow in this blog post which may serve as a useful example.

     

    You can revoke shared links via the API by using the /2/sharing/revoke_shared_link endpoint. That requires one API call per shared link though, so you'd need to make multiple calls to revoke multiple links.

  • REL_IT's avatar
    REL_IT
    Explorer | Level 3
    2 years ago

    HI Greg,

    Thanks you for the clarification, I have created a new access token and generated the links via api where it generates sub folder level links. Now that the sl token expires i lost my refresh token. Should i again generate token ?? 

     

    Also can you let me know if there is way to delete bulk shared links since i cant have the expire feature because of Dropbox plus. Please advise. 

    Thanks

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

    REL_IT 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.

     

    Updating the scopes on an app or creating new access tokens would not impact or expire existing long-lived access tokens.

     

    For help with any 500 errors on the Dropbox web site itself, please contact support.

  • Megan's avatar
    Megan
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    2 years ago

    Hey REL_IT, thanks for clarifying! 

     

    It sounds like our API part of our Community would be able to help better with this, since we're talking about an app that you've created on your end. 

     

    I'm going to be moving your thread there, and an agent will take over, thank you!

  • REL_IT's avatar
    REL_IT
    Explorer | Level 3
    2 years ago

    Iam thinking about one more solution but i am facing bottle neck there. My App is using Dropbox sdk and also a long lived access token which is already stopped by dropbox for new generation. 

     

    My app also has share.write access as well in the admin console. But still when i try to create a link using createsharedlinkwithsettings method iam facing the following error "{"error":{".tag":"missing_scope","required_scope":"sharing.write"},"error_summary":"missing_scope/"}
    " .

     

    Note: APP is currently in production and in use and cant risk the loss of or forcing the current  long lived access token to expire by doing some action. So I'm stuck at that level else i would at least run a scheduler to generate link for a list of the folders atleast i need. Walter 

  • REL_IT's avatar
    REL_IT
    Explorer | Level 3
    2 years ago

    Cleared cache and approved the same, Still same issue. Walter 

  • REL_IT's avatar
    REL_IT
    Explorer | Level 3
    2 years ago

    I didnt get any resolution related to other post. Iam trying to atleast invite or make people join to access the same.

     

    You mean asking to clear cache before approving or from the user's end who is requesting.

  • Walter's avatar
    Walter
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    2 years ago

    Hey REL_IT - sorry to hear about this.

     

    Could you let us know if the error persists after clearing your browser's cache or on another browser too?

     

    Also, is this issue related to your other post perhaps?

     

    Keep me posted! 

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.6,018 PostsLatest Activity: 12 hours ago
401 Following

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 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!