public /*@Nullable*/ DbxUrlWithExpiration createTemporaryDirectUrl ( String path ) throws DbxException { DbxPathV1 . checkArgNonRoot ( "path" , path ) ; String apiPath = "1/media/auto" + path ; return doPost ( host . getApi ( ) , apiPath , null , null , new DbxRequestUtil . ResponseHandler < /*@Nullable*/ DbxUrlWithExpiration > ( ) { @ Override public /*@Nullable*/ DbxUrlWithExpiration handle ( HttpRequestor . Response response ) throws DbxException { if ( response . getStatusCode ( ) == 404 ) return null ; if ( response . getStatusCode ( ) != 200 ) throw DbxRequestUtil . unexpectedStatus ( response ) ; return DbxRequestUtil . readJsonFromResponse ( DbxUrlWithExpiration . Reader , response ) ; } } ) ; }
Creates and returns a publicly - shareable URL to a file s contents . This URL can be used without authentication . This link will stop working after a few hours .