Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/288.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php Dropbox REST API缩略图调用_Php_Rest_Thumbnails_Dropbox - Fatal编程技术网

Php Dropbox REST API缩略图调用

Php Dropbox REST API缩略图调用,php,rest,thumbnails,dropbox,Php,Rest,Thumbnails,Dropbox,我正在编写一个脚本,它使用dropbox的RESTAPI从dropbox中获取文件 $this->oauth=newOAuth($consumer\u key、$consumer\u secret、oauth\u SIG\u METHOD\u HMACSHA1、oauth\u AUTH\u TYPE\u AUTHORIZATION) $url=”“; $this->oauth->fetch($url) 像这样的呼叫正在工作,所以我得到了正确的身份验证。然而,我不能让缩略图调用工作。 我有像这样的

我正在编写一个脚本,它使用dropbox的RESTAPI从dropbox中获取文件

$this->oauth=newOAuth($consumer\u key、$consumer\u secret、oauth\u SIG\u METHOD\u HMACSHA1、oauth\u AUTH\u TYPE\u AUTHORIZATION)

$url=”“; $this->oauth->fetch($url)

像这样的呼叫正在工作,所以我得到了正确的身份验证。然而,我不能让缩略图调用工作。 我有像这样的链接

这是一个现有文件,只是通过上面的调用获取的(其中列出了我的文件)。我的Dropbox应用程序处于“完整Dropbox”模式,所以作为root用户的“Dropbox”也应该可以。我要走了 “致命错误:未捕获的异常‘OAuthException’,消息‘无效的身份验证/错误的请求(获得403,预期为HTTP/1.1 20X或重定向)’…”错误不断

任何帮助都会被感激的,我开始为此感到沮丧。
非常感谢

我假设你在某处有
$this->oauth->setToken(…)
,对吗?您能否捕获异常并检查403的实际主体?也许错误信息会告诉我们更多。嗨!这是“无效签名”。顺便说一下,我正要写一个答案,因为我能解决这个问题。问题在于授权,请求没有正确签名。我昨天超负荷工作,但今天只需几分钟就能看到。