# 将discourse社区账号与第三方CRM工具集成的OAUTH流程，可以创建社区工单

**URL:** <https://meta.discourse.org/t/oauth-flow-to-integrate-the-discourse-community-account-with-the-third-party-crm-tool-where-it-can-create-tickets-of-community/343092>\
**Category:** Development\
**Tags:** webhooks, oauth2, openid-connect, rest-api, platforms\
**Created:** [2024年十二月18日 04:32 UTC](https://meta.discourse.org/t/oauth-flow-to-integrate-the-discourse-community-account-with-the-third-party-crm-tool-where-it-can-create-tickets-of-community/343092 "2024-12-18T04:32:16Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![kekafel](https://avatars.discourse-cdn.com/v4/letter/k/bc79bd/32.png) [@kekafel](https://meta.discourse.org/u/kekafel)\
**Post date:** [2024年十二月18日 06:45 UTC](https://meta.discourse.org/t/oauth-flow-to-integrate-the-discourse-community-account-with-the-third-party-crm-tool-where-it-can-create-tickets-of-community/343092/3 "2024-12-18T06:45:01Z")

</div>

感谢 @thoka  
创建和配置 API 密钥：  
使用这些文档就像从 Discourse（社区账户）生成 API 密钥，然后手动将该 API 密钥添加到我的 Web 应用程序中，之后我将使用该密钥进行 API 调用。

- [将 Discourse 用作身份提供者 (SSO, DiscourseConnect)](https://meta.discourse.org/t/use-discourse-as-an-identity-provider-sso-discourseconnect/32974)  
这也不能满足我对 OAuth 流程的需求，因为它在成功完成所有步骤后不会返回任何令牌。  
它仅对 SSO 登录有用。

我将更详细地解释我的用例：-  
用户可以点击按钮 [添加 Discourse]  
它将用户重定向到 Discourse 的 OAuth 页面，用户将在该页面授予我所有权限  
点击接受后，Discourse 将令牌返回到我的 callbackUrl  
我将存储该令牌并用于后续的 API 调用

是否有任何文档可以帮助我实现相同的功能。

---

_[View the full topic](https://meta.discourse.org/t/oauth-flow-to-integrate-the-discourse-community-account-with-the-third-party-crm-tool-where-it-can-create-tickets-of-community/343092)._
