Vimeo的API AuthorizationUrl没有登录 [英] Vimeo API AuthorizationUrl Without Login
问题描述
我使用Vimeo的API来获取上的Web应用程序上下文的视频和我有一个简单的问题(我希望:P)
I'm using Vimeo API to get video on a web application context and i have a simple question (i hope :P )
可能汇入作业使用OAuth协议,并通过下面的链接继续做应用程序授权的请求: https://vimeo.com/oauth/authorize?oauth_token=XXXX ,没有强制用户在浏览器登录?
It´s possible to do a request for application authorization using oAuth protocol and via the following link: https://vimeo.com/oauth/authorize?oauth_token=XXXX, WITHOUT force the user to login in browser?
我注意到,如果我没有登录Vimeo上,当我去 https://开头vimeo.com/oauth/authorize?oauth_token=XXXX ,Vimeo的我重定向到登录页面...
I noticed that if I'm not logged on Vimeo, when I go to https://vimeo.com/oauth/authorize?oauth_token=XXXX, Vimeo redirects me to the login page...
感谢。
推荐答案
我发现它=)
您可以创建使用应用程序凭据或使用登录数据的访问令牌。在这种情况下,你不必做一个授权的呼叫。
You can create the access token using the application credentials or using the login data. In this case you don't have to make a authorize call.
示例(从评论所):
String vimeoAPIURL = "vimeo.com/api/rest/v2?video_id=213";
OAuthRequest request = new OAuthRequest(Verb.GET, vimeoAPIURL);
request.addQuerystringParameter("format", "json");
request.addQuerystringParameter("method","vimeo.videos.getUploaded";
request.addQuerystringParameter("user_id", "user137");
request.addQuerystringParameter("full_response", "true");
request.addQuerystringParameter("method","vimeo.videos.getThumbnailUrls");
service.signRequest(accessToken, request);
Response response = request.send();
Syso(response.getCode());
Syso(response.getBody());
这篇关于Vimeo的API AuthorizationUrl没有登录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!