我不明白Twitter API的所有不同键是什么
我不明白 api键
, api键秘密
, bearer sotken
,访问令牌
<代码有什么区别。 >访问秘密。还有客户端ID
和客户端秘密
,这是非常令人困惑的事情。
我希望创建一个Twitter机器人,但我觉得这很令人困惑。我尝试搜索我的问题,并在YouTube上进行搜索,但是我尚未找到答案可以清除我的问题。
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
诚然,这些术语有点令人困惑;但是这些术语具有相同的含义:
消费者密钥= customer键= api键
openter secret = customer necret = customer necret = api secret key
in tockens tokens tokens token ever neckens and bearer doken代表您提出请求的用户代表。
访问令牌和访问秘密 - 它们是您应用程序的用户名和密码。
以及它们的用法:
消费者密钥,消费者秘密,访问令牌,访问秘密(或仅根据您使用的语言和库访问令牌和访问秘密) - 如果您的软件向使用Post方法的端点请求请求,也就是说,即它的推文,回复了一条推文等。
如果软件通过Get方法提出请求请求端点,则用携带者令牌对端点进行认证就足够了。携带者令牌的另一种用途是Twitter API V2,如果尝试向该API的端点提出请求,则仅接受载体令牌身份验证。
有关更详细的信息访问Twitter API
Admittedly the terms are a bit confusing;but these terms have the same meaning:
Consumer key = Customer key = Api key
Consumer secret = Customer secret = Api secret key
In general, tokens above and Bearer token represent the user that you are making the request on behalf of.
Access token and Access secret - they are Username and Password for your App.
And their usage:
Consumer key, Consumer secret, Access token, Access Secret (or only Access token and Access Secret depending on language and libraries you are using) - these are needed if your software make request to endpoints with POST method, that is if it tweets, replies to a tweet and etc.
If the software make request to endpoints with GET method then authenticating with Bearer Token is enough. Another use of Bearer Token is with Twitter API v2, which only accepts Bearer Token authentication if try to make requests to endpoints of this api.
For more detailed information Getting Access to Twitter API
如果您想简单地阅读推文,那么携带者令牌就足够了。
如果要创建推文,则需要使用:
API键
API密钥秘密
访问令牌
访问令牌秘密
不需要客户ID和客户端秘密。
这里有一个完整的文章:
If you want to simply read tweets, then Bearer Token is enough.
If you want to create tweets then you will need to use:
API Key
API Key Secret
Access Token
Access Token Secret
The client Id and client secret are not require.
There's a full articl here:
https://pythonhowtoprogram.com/how-to-build-a-twitter-bot-with-python-and-twitter-api-v2/