问题描述
我正在尝试创建一个流畅的解决方案,用于通过自定义文件展示(徽标字体等)来共享文件.
I'm trying to create a smooth solution for sharing files with a custom presentation of the files (logos fonts etc).
我的理想是将文件放在 dropbox 文件夹中,然后在单独的服务器上创建一个网页,通过 javascript 访问这些文件并显示链接到实际文件的列表.
My ideal would be to put the files in a dropbox folder and then have a webpage, on a separate server, access those files over javascript and display a list of them linked to the actual files.
要求最终用户无需通过保管箱帐户进行身份验证即可访问文件.我更愿意使用公共文件夹或使用其他帐户中的文件.
A demand is that the end user don't have to authenticate with a dropbox acocunt in order to access the files. I would rather like to use a public folder or use files from another account.
有什么方法可以维护一个 auth-session 服务器端,比如永久 sessionID 之类的东西?
Is there any way to maintain a auth-session serverside, something like a permanent sessionID or something like that?
推荐答案
只需进行一次身份验证,批准您的应用,获取您的身份验证密钥,并在代码中:
Just do the authentication one time, approve your app, get your authentication key, and in the code:
$dbxClient = new dbx\Client($accessToken, "PHP-Example/1.0");
$accountInfo = $dbxClient->getAccountInfo();
print_r($accountInfo);
变化:
$accessToken to "{Your auth key}"
或放一行:
$accessToken = "{authentication code here}";
上面那个代码.
这篇关于在没有客户端身份验证的情况下访问 dropbox api?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!