cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox here.

Discuss Dropbox Developer & API

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Api error "LookupError" for sharing_create_shared_link_with_settings

Api error "LookupError" for sharing_create_shared_link_with_settings

arch2020
Helpful | Level 5
Go to solution

Hi all, 

 

I am new to dropbox api. My problem is whenver I try to create an app folder from the app console, the connection never works and I keep receiving an error regarding to the path, see below:

 

ApiError: ApiError('187007dde9fb433ea831afd60b273b83', CreateSharedLinkWithSettingsError('path', LookupError('not_found', None)))

 

I am fully aware that app folder can only access the files inside the  the folder of the main app. Hence,  I embedded the file I want to access inside the app folder in dropbox . I am using the following code:

 

import dropbox

dbx = dropbox.Dropbox(<app token>)

shared_link_metadata = dbx.sharing_create_shared_link_with_settings("/Apps/App_Name/example.xlsx")
print (shared_link_metadata.url)

Any ideas on how to overcome this issue?

Your help is much appreciated, 

Thanks 

1 Accepted Solution

Accepted Solutions

Здравко
Legendary | Level 20
Go to solution

Hi @arch2020,

Try transform the path from "/Apps/App_Name/example.xlsx" to "/example.xlsx". Is this helps? 🤔

Try to explain why. 😉

View solution in original post

6 Replies 6

Здравко
Legendary | Level 20
Go to solution

Hi @arch2020,

Try transform the path from "/Apps/App_Name/example.xlsx" to "/example.xlsx". Is this helps? 🤔

Try to explain why. 😉

arch2020
Helpful | Level 5
Go to solution

@

 

It worked like magic. Thanks, it seems that with app folder, there is no need for referencing the name of the app, as the default location of the app, will always be the name of the app folder.  very grateful for your help, you saved me tons of tons and unnecessary hustle. 

Здравко
Legendary | Level 20
Go to solution

@arch2020 wrote:

 

..., it seems that with app folder, there is no need for referencing the name of the app, as the default location of the app, will always be the name of the app folder.  ...

🙂 Almost exactly! 👍

Actually, the app' folder forms a namespace that become a root folder for access from the application side. 😉

arch2020
Helpful | Level 5
Go to solution

thanks that really helped me alot to get past through my novice hardship :). 

Greg-DB
Dropbox Staff
Go to solution

That's correct. You can also use files_list_folder and files_list_folder_continue to list the contents of any folder. For example, to list the contents of the root folder for your app, supply a path value of the empty string "". Then you can get the path values of any of the contents from the Metadata.path_lower value for the entry in the result.

arch2020
Helpful | Level 5
Go to solution

many thanks @Greg-DB  your additional information was really helpful. 

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    arch2020 Helpful | Level 5
  • User avatar
    Greg-DB Dropbox Staff
  • User avatar
    Здравко Legendary | Level 20
What do Dropbox user levels mean?