cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Share your feedback on the Document Scanning Experience in the Dropbox App right here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

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

Google App Engine and Java SDK GetTemporaryLink Error

Google App Engine and Java SDK GetTemporaryLink Error

iwansyahp
Explorer | Level 3

I use Dropbox to save my application's user uploaded files. The upload part is running well. But When I try to get temporary link to my user's (not Dropbox user) files. I can't get the temporary link, the App is running at Google App Engine. Anyone can give a hint what should I do to avoid the error?

 

Thanks.

12 Replies 12

Greg-DB
Dropbox Staff

The 200 or 409 are just some possible status codes, and only indicate success/failure at a high level. The response body would contain more specific success or error information, but your screenshot doesn't include it unfortunately.

 

The SDK reads the response body and converts it to the native return type or exception, respectively, though. For example, if there is nothing found at the specific path, the response would be a 409 with some JSON indicating the issue in the response body, converted into a native exception by the SDK.

 

Please check what output or exception you're getting from the method. For instance, here's an example of handling a few different exceptions. The getTemporaryLink method throws GetTemporaryLinkErrorException.

iwansyahp
Explorer | Level 3

dbx-error.png

 

 

That is the response (body) and Catched exception I got when accessing the file through the SDK. I have checked filename reference value in my application database are right and same. Even when I try accessing and opening file through Dropbox.com (manually) are okay, but my app still can't get the temporarylink.

chirstius
Dropbox Staff

Does this app have full Dropbox access, or is it within an App Folder?

 

It's possible the path you are providing in code is invalid. For example, if you're app is hosted in an app folder, it will show up as:

/Apps/App Name

When viewing it via the web or desktop UI. However, within the application, and for all calls to the API, the /Apps/App Name folder is actually the root "/" folder.

A common error is to provide the "full" path to a file when calling against an app folder-based application:

client.files().getTemporaryLink("/Apps/App Name/Folder/file.name");

 

rather than just providing the path information from the application root folder:

 

client.files().getTemporaryLink("/Folder/file.name");

You posted a code sample showing the method, and it takes a 'path' argument. Can you verify if your application is App Folder-based, and if so, verify that the path information being passed in is correct?

 

Thanks!

 

-Chuck

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    chirstius Dropbox Staff
  • User avatar
    iwansyahp Explorer | Level 3
  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?