Forum Discussion

deeplove's avatar
deeplove
New member | Level 2
3 years ago

Upload sqlite db file to my application folder only using android app not working

I have simple image based notes taking like app and i am storing all data and image in SQLite database. Now i need to implement sync functionality with drop box using java sdk, already downloaded project. But the file is not getting upload and can not read from it, getting error 

Error: com.dropbox.core.InvalidAccessTokenException: {"error_summary": "missing_scope/.", "error": {".tag": "missing_scope", "required_scope": "files.metadata.read"}}

 

and getting  image file upload error from demo 

Error: com.dropbox.core.InvalidAccessTokenException: {"error_summary": "missing_scope/...", "error": {".tag": "missing_scope", "required_scope": "files.content.write"}}

  • Здравко's avatar
    Здравко
    Legendary | Level 20

    deeplove wrote:

    ...

    Error: com.dropbox.core.InvalidAccessTokenException: {"error_summary": "missing_scope/.", "error": {".tag": "missing_scope", "required_scope": "files.metadata.read"}}

    ...

    Error: com.dropbox.core.InvalidAccessTokenException: {"error_summary": "missing_scope/...", "error": {".tag": "missing_scope", "required_scope": "files.content.write"}}


    Hi deeplove,

    The reason for your issue can be seen within the errors messages. 🤷 Just follow them! 😉 In particular you can't enumerate your files because of missing metadata read scope (i.e. read permission for metadata) and you can't write any file content because of missing content write scope (i.e. write permission to files content). Seems you have forgot select needed scopes (permissions) and that's why have restricted yourself.

    Hope this helps.

    • Brogers's avatar
      Brogers
      Icon for Dropbox Staff rankDropbox Staff

      Hello deeplove,

       

      Здравко is right regarding the missing scopes. You can add scopes to your application by going to the app console, navigating to the app you are using, go into the permissions tab, and add the scopes for this application. To fix the issues you specifically mentioned, you would need to add files.metadata.read and files.metadata.write.

       

      Additionally, you will need to re-authenticate with the app to get access to these scopes since scopes are linked to an access/refresh token. 

       

      Thanks,

      Brad

About Dropbox API Support & Feedback

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