在没有客户端身份验证的情况下访问Dropbox API? [英] Access dropbox api without clientside authentication?

查看:109
本文介绍了在没有客户端身份验证的情况下访问Dropbox API?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试创建一种平滑的解决方案,以使用文件的自定义表示形式(徽标字体等)共享文件.

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.

需求是最终用户不必使用保管箱acocunt进行身份验证即可访问文件.我想使用公用文件夹或使用其他帐户的文件.

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.

有什么方法可以维护身份验证会话服务器端,例如永久会话ID或类似的东西?

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?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆