没有可用于给定请求的身份验证功能 [英] No auth function available for given request

查看:64
本文介绍了没有可用于给定请求的身份验证功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是使用DropBox的Api的新手(请参阅: https://www.dropbox.com/developers-v1/core/docs#oauth2-methods ).现在有一个问题困扰着我-

I'm a newbie to access with DropBox's Api (See: https://www.dropbox.com/developers-v1/core/docs#oauth2-methods). Now there's a problem rocking me——

1)我成功获取了一个access_token.2)我想通过直接调用" https://api.dropboxapi.com/1/account/info来查看用户的详细信息".但是结果是:

1) I get an access_token successfully. 2) I wanna see the user's detailled info by directly calling "https://api.dropboxapi.com/1/account/info". However the result is:

{"error_description": "No auth function available for given request", "error": "invalid_request"}

似乎我应该给地址提供一些信息,以确保我已经通过身份验证.但是如何?我在文档中什么都没看到……?在哪里啊谢谢

It seems that I should give the address something to make sure that I'm already authenticated. But how? I didn't see anything in Documents……? Any where? Thanks

推荐答案

API使用OAuth 2,因此您需要将" Authorization "标头附加到值" Bearer"ACCESSTOKEN ",其中ACCESSTOKEN是您通过OAuth流程获得的访问令牌.

The API uses OAuth 2, so you'll want to attach an "Authorization" header with the value "Bearer ACCESSTOKEN", where ACCESSTOKEN is the access token you obtained through the OAuth process.

这篇关于没有可用于给定请求的身份验证功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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