API密钥和开发者密钥之间的YouTube API差异 [英] YouTube API difference between API Key and Developer Key

查看:2634
本文介绍了API密钥和开发者密钥之间的YouTube API差异的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一些问题的理解API密钥和开发的重点,当涉及到利用YouTube的API之间的差异。

I'm having some issues understanding the differences between an API Key and a Developer's Key when it comes to utilizing the YouTube API.

我的应用程序正在使用中的Youtube API的V3的宁静的请求,我可以设置通过gapi.client.setApiKey()函数,这是我在开发过程中做了一个API密钥,但是当我在看的配额,的https://groups.google.com/forum/?fromgroups=#!topic/youtube-api-gdata/e1JDQ4lqbXU,它指出,他们是绑一个开发人员密钥,而不是和开发重点应与每个请求被发送。我继续得到了一个为发展宗旨,但我不知道他们如何彼此互动。

My application is using the restful requests in v3 of the Youtube API and I can set an API key via the gapi.client.setApiKey() function , which I have done during development, but when I was looking at the quotas, https://groups.google.com/forum/?fromgroups=#!topic/youtube-api-gdata/e1JDQ4lqbXU, it states that they are tied to a developer key instead and that the developer key should be sent with each request. I went ahead and got one for development purposes, but I'm not sure how they interact with each other.

我还没有找到如何与每个宁静的发送请求开发者的键(如gapi.client.youtube.channels.list)的任何细节,只是如何做一个当它包含在页眉或查询字符串定期get请求。

I also didn't find any details on how to send the developer's key with each restful request (such as gapi.client.youtube.channels.list), only how to include it in the header or query string when making a regular get request.

有人可以帮助我了解这两种,它们之间的关系之间的区别,我是否需要双方,以及如何使用它们在宁静的请求,或者如果我需要切换到普通的GET请求?

Can someone help me understand the difference between the two, how they are related, whether I need both, and how to use them in restful requests, or if I need to switch to regular get requests?

推荐答案

抱歉的混乱。

开发键指的是使用过的键v1或 V2 YouTube数据API的。您可以href="https://$c$c.google.com/apis/youtube/dashboard/gwt/index.html">这里

"Developer keys" refer to keys that worked with v1 or v2 of the YouTube Data API. You can obtain them here. There's a separate quota system in place for v1/v2 and yes, developer keys do come into play there.

API密钥指的是使未经授权的请求使用时所使用的键 V3 YouTube数据API的。 (如果你正在做一个身份验证的请求,你不包括API密钥,因为OAuth的2客户端ID /秘密标识您的应用程序。)你得到,你可以在YouTube从的谷歌API控制台,打开YouTube数据API V3因为你正在使用的服务的一前一后。配额在V3是依赖于您的API控制台项目,哪个项目你的API密钥识别正在使用。

"API Keys" refer to keys that you use when making unauthenticated requests using v3 of the YouTube Data API. (If you're making an authenticated request, you don't include an API Key, since the OAuth 2 client id/secret identifies your application.) You get an API Key that you could use with YouTube from the Google APIs console, after turning on the YouTUbe Data API v3 as one of the Services you're using. Quota in v3 is tied to your API Console project, and your API Key identifies which project you're using.

外卖是,如果你让未经身份验证的YouTube数据API V3调用,您应该只包括你请求中的谷歌API控制台的API密钥。如果你使用的是JavaClient库,这是通过 gapi.client.setApiKey做()

The takeaway is that if you're making unauthenticated YouTube Data API v3 calls, you should only include an API Key from the Google APIs console in your request. If you're using the JavaClient library, that's done via gapi.client.setApiKey().

这篇关于API密钥和开发者密钥之间的YouTube API差异的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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