php - 如何通过 PHP CLI 获取 BitBucket 的 RSS token ?

标签 php rss bitbucket

我想获取有效链接 https://bitbucket.org/{username}/rss/feed?token={token}(这是主要问题)然后从中获取有效响应CLI 中的链接。

我知道我需要的参数,例如consumer_key, consumer_secret, request_token_url, authenticate_url, access_token_url.

我尝试使用 StudioIbizz\OAuth\OAuth1,但它似乎是为浏览器设计的,而不是为 CLI 设计的。

我尝试运行:

$this->OAuth = new \StudioIbizz\OAuth\OAuth1($this->consumer_key,$this->consumer_secret);

$requestToken = $this->OAuth->getRequestToken($this->request_token_url,$this->authenticate_url);

$token = $requestToken['oauth_token_secret'];

并将此 $token 粘贴到我的 RSS 链接,但随后我看到来自 Bitbucket 的消息 You must have read access to access the RSS feed.

我需要针对严肃傻瓜的分步说明。


编辑:我试过这个:

$accessToken = $this->OAuth->getAccessToken($this->access_token_url,$requestToken['oauth_token_secret'],$requestToken['oauth_token']);

但后来我明白了:

Fatal error: Uncaught exception 'StudioIbizz\OAuth\OAuthException' with message 'Unexpected HTTP status #400'

最佳答案

我在官方文档中没有看到任何与此相关的功能。也许该功能不存在。 有关更多信息,您可以使用此链接:

https://confluence.atlassian.com/bitbucket/use-the-bitbucket-cloud-rest-apis-222724129.html

关于php - 如何通过 PHP CLI 获取 BitBucket 的 RSS token ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31425669/

相关文章:

ios - 将 "standardize"网页内容格式导入应用程序的好方法是什么?

XSLT错误: xmlParseEntityRef

Bitbucket 搜索 repo API

git - 我用 "git mv"移动了所有项目文件,但我丢失了所有历史记录。为什么?

php - 如何获取具有相同列名的连接表的列名结果?

javascript - 当我从其他域的 coideigniter 中使用 ajax 进行调用时丢失 session

rss - 有没有办法让Bing和Google新闻搜索成为RSS?

php - 如何告诉 Git 我正在升级 php?

php - 调用未定义函数 odbc_connect() php 7

git - BitBucket 推送功能分支模型