我不明白Twitter API的所有不同键是什么

发布于 2025-01-28 03:53:02 字数 255 浏览 2 评论 0 原文

我不明白 api键 api键秘密 bearer sotk​​en 访问令牌 <代码有什么区别。 >访问秘密。还有客户端ID 客户端秘密,这是非常令人困惑的事情。

我希望创建一个Twitter机器人,但我觉得这很令人困惑。我尝试搜索我的问题,并在YouTube上进行搜索,但是我尚未找到答案可以清除我的问题。

I cannot understand what is the difference between API key, API key secret, Bearer Token, Access Token Access Secret. There is also Client ID and Client Secret which is something very confusing.

I wish to create a Twitter bot, but I find this very confusing. I have tried googling my question, and searching it up on youtube, but I have not found an answer that clears my question.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

早乙女 2025-02-04 03:53:02

诚然,这些术语有点令人困惑;但是这些术语具有相同的含义:

消费者密钥= 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

霓裳挽歌倾城醉 2025-02-04 03:53:02

如果您想简单地阅读推文,那么携带者令牌就足够了。

如果要创建推文,则需要使用:
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/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文