正如标题所示,我正在尝试生成刷新令牌,然后我想使用刷新令牌来获取短暂的访问令牌。
但有一个问题,因为我不够聪明,无法理解dropbox 网站上的文档,而且我发现的所有其他信息对我不起作用(A、B、C)或者是某种语言我不明白。
我已经尝试了github 页面中的所有三个示例,以及该网站上其他问题的用户代码。
我没有什么事情要做。
我得到的最多的是
错误:400 客户端错误:URL 请求错误:api.dropboxapi.com/oauth2/token
和
dropbox.rest.RESTSocketError:连接到“api.dropbox.com”时出错:[SSL:CERTIFICATE_VERIFY_FAILED]证书验证失败:无法获取本地颁发者证书(_ssl.c:1123)
:(
我想在我的应用程序中使用dropbox.我开发了一个上传和下载文件的示例应用程序,并要求进行身份验证.
但我不想打开登录弹出窗口.
是否可以使用默认帐户(单个帐户)登录详细信息访问其他用户的Dropbox?因此任何用户都可以直接使用dropbox而无需登录弹出窗口.
我正在将大型文件(1gb +)从Dropbox传输到YouTube,并希望告知用户交易可能需要多长时间.有没有办法测量PHP中的网络流量?
我确实找到了linux shell的解决方案(如何衡量网络性能(如何测试网络协议))但不是PHP.
除了告知用户我想检查保证带宽(100 mbit/s),因为我遇到了几次网络问题(带宽太低).
import dropbox
client = dropbox.client.DropboxClient('<token>')
f = open('/ssd-scratch/abhishekb/try/1.mat', 'rb')
response = client.put_file('/data/1.mat', f)
Run Code Online (Sandbox Code Playgroud)
我想将一个大文件上传到dropbox.我该如何检查进度?[文件]
编辑:以上的某种情况下,上传者也是如此.我究竟做错了什么
import os,pdb,dropbox
size=1194304
client = dropbox.client.DropboxClient(token)
path='D:/bci_code/datasets/1.mat'
tot_size = os.path.getsize(path)
bigFile = open(path, 'rb')
uploader = client.get_chunked_uploader(bigFile, size)
print "uploading: ", tot_size
while uploader.offset < tot_size:
try:
upload = uploader.upload_chunked()
print uploader.offset
except rest.ErrorResponse, e:
print("something went wrong")
Run Code Online (Sandbox Code Playgroud)
编辑2:
size=1194304
tot_size = os.path.getsize(path)
bigFile = open(path, 'rb')
uploader = client.get_chunked_uploader(bigFile, tot_size)
print "uploading: ", tot_size
while uploader.offset < tot_size:
try:
upload = uploader.upload_chunked(chunk_size=size)
print …
Run Code Online (Sandbox Code Playgroud) 我刚刚创建了一个需要Dropbox.com API库的Android应用程序.我现在正试图在'Release'模式下构建应用程序,并希望在代码上运行proguard以便对其进行模糊处理.但是,每当我尝试运行Proguard时,都会收到以下错误:
Proguard returned with error code 1. See console
Warning: com.dropbox.client2.DropboxAPI: can't find referenced class org.json.simple.JSONArray
Warning: com.dropbox.client2.DropboxAPI: can't find referenced class org.json.simple.JSONArray
Warning: com.dropbox.client2.DropboxAPI$Entry: can't find referenced class org.json.simple.JSONArray
Warning: com.dropbox.client2.DropboxAPI$Entry: can't find referenced class org.json.simple.JSONArray
Warning: com.dropbox.client2.RESTUtility: can't find referenced class org.json.simple.parser.JSONParser
Warning: com.dropbox.client2.RESTUtility: can't find referenced class org.json.simple.parser.JSONParser
Warning: com.dropbox.client2.RESTUtility: can't find referenced class org.json.simple.parser.JSONParser
Warning: com.dropbox.client2.RESTUtility: can't find referenced class org.json.simple.parser.ParseException
Warning: there were 8 unresolved references to classes or interfaces.
You may need to …
Run Code Online (Sandbox Code Playgroud) 我需要验证多个帐户
我已经搜索了论坛,似乎有可能所以我尝试了一下,但我失败了
我曾尝试使用相同的API APP_KEY和APP_SECRET,它失败我的会话都返回相同的访问权限对
所以我尝试使用不同的API APP_KEY和APP_SECRET,在相同的Dropbox帐户下,它也失败了
所以我再次尝试使用来自不同Dropbox帐户的不同API APP_KEY和APP_SECRET,它仍然失败
有谁能为我提供解决方案?提前致谢
下面是我的代码,主要来自DBroulette的例子
onCreate(android)
AndroidAuthSession session = buildSession();
mApi = new DropboxAPI<AndroidAuthSession>(session);
AndroidAuthSession session2 = buildSession2();
mApi2 = new DropboxAPI<AndroidAuthSession>(session2);
Run Code Online (Sandbox Code Playgroud)
onResume(android)
AndroidAuthSession session = mApi.getSession();
if (session.isLinked()) {
dbsetLoggedIn(true);
} else {
dbsetLoggedIn(false);
}
if (session.authenticationSuccessful()) {
try {
session.finishAuthentication();
TokenPair tokens = session.getAccessTokenPair();
dbstoreKeys(tokens.key, tokens.secret);
dbsetLoggedIn(true);
statusTv.append("Dropbox authentication successful\n");
} catch (IllegalStateException e) {
Log.i("Dropbox Error", "Error authenticating", e);
}
}
AndroidAuthSession session2 = mApi2.getSession();
if (session2.isLinked()) {
dbsetLoggedIn2(true);
} else { …
Run Code Online (Sandbox Code Playgroud) 我正在尝试将DropBox集成到我的iPhone应用程序中.但我得到的错误就像
[ERROR] DropboxSDK: unable to link; app isn't registered for correct URL scheme (db-xpt9oxj57x9ftci)
Run Code Online (Sandbox Code Playgroud)
任何人都可以帮我解决这个问题吗?
作为移动开发人员,我正在寻找一种解决方案,允许我的应用程序的用户下载多个.zip文件,这将为我的应用程序添加"模块化"感觉.我在另一个应用中使用了Dropbox API,允许用户将项目备份到他们的帐户,但现在我需要用户访问我的帐户.
有没有办法自动验证我的帐户的Dropbox会话,或只是连接到我的公共文件夹,而用户甚至没有注意到?
将我的访问密钥和应用密钥/密钥硬编码到应用程序中的安全隐患是什么?我知道从.apk获取源代码非常简单,但有人可以用这些信息做些什么呢?
我正在尝试DropboxSync
在现有的Android应用程序中实现API.
我已下载DropboxSync
API并复制了Application的lib文件夹中的所有库.
我还将Native Library位置指向libDropboxSync.so所在的libs文件夹.
Manifest.xml
....
<!-- Dropbox Activities -->
<activity android:name="com.dropbox.sync.android.DbxAuthActivity" />
<activity
android:name="com.dropbox.client2.android.AuthActivity"
android:launchMode="singleTask" >
<intent-filter>
<data android:scheme="db-intentionally-hidden-app-key" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<service
android:name="com.dropbox.sync.android.DbxSyncService"
android:enabled="true"
android:exported="false"
android:label="Dropbox Sync" />
Run Code Online (Sandbox Code Playgroud)
Main_Activity.java
public class Activity_Main extends Activity implements OnClickListener,
OnItemClickListener, OnTouchListener {
....
....
....
private DbxAccountManager mDbxAcctMgr;
onCreate(....)
{
//Application giving FATAL EXCEPTION on the line below.
mDbxAcctMgr = DbxAccountManager.getInstance((Activity)Activity_Main.this, DROPBOX_APP_KEY, DROPBOX_APP_SECRET);
....
}
....
}
Run Code Online (Sandbox Code Playgroud)
Logcat …
我一直在尝试使用python3中的files_upload()函数将一个简单文件上传到dropbox
即使尝试Dropbox网站上提供的教程中的代码,我也会收到错误,但我不明白为什么.我在这里错过了什么?
这是我的代码:
import dropbox
dbx = dropbox.Dropbox("my_access_token")
data = "asd"
dbx.files_upload(data, '/file.txt')
Run Code Online (Sandbox Code Playgroud)
这是我尝试运行时收到的错误消息:
Traceback (most recent call last):
File "dbox.py", line 7, in <module>
dbx.files_upload(data, '/file.txt')
File "/usr/local/lib/python3.4/dist-packages/dropbox/base.py", line 1225, in files_upload
f,
File "/usr/local/lib/python3.4/dist-packages/dropbox/dropbox.py", line 249, in request
timeout=timeout)
File "/usr/local/lib/python3.4/dist-packages/dropbox/dropbox.py", line 341, in request_json_string_with_retry
timeout=timeout)
File "/usr/local/lib/python3.4/dist-packages/dropbox/dropbox.py", line 385, in request_json_string
type(request_binary))
TypeError: expected request_binary as binary type, got <class 'str'>
Run Code Online (Sandbox Code Playgroud)
我尝试过不同的方式:
1.
with open("/home/pi/Desktop/dbox/asd.txt", "rb") as f:
dbx.files_upload(f, '/asd.txt', mute = True) …
Run Code Online (Sandbox Code Playgroud) dropbox-api ×10
dropbox ×7
android ×5
python ×2
python-3.x ×2
access-token ×1
app-id ×1
ios ×1
iphone ×1
java ×1
objective-c ×1
php ×1
progress-bar ×1
proguard ×1
python-2.7 ×1