【问题标题】:Can you retrieve the Intuit User ID through OAuth您可以通过 OAuth 检索 Intuit 用户 ID
【发布时间】:2013-04-24 16:34:53
【问题描述】:

我正在使用“连接到 QuickBooks”按钮创建与 QuickBooks Online 的连接,如下页所述:

http://docs.developer.intuit.com/0025_Intuit_Anywhere/0010_Getting_Started/0020_Connect/0010_From_Within_Your_App/Implement_OAuth_in_Your_App

使用此方法可以检索用户输入的 Intuit 用户 ID(在 Intuit 登录对话框中提示时),以便我可以将该用户 ID 与访问令牌、访问令牌密钥和 realmId 相关联,即返回。

【问题讨论】:

    标签: intuit-partner-platform quickbooks-online


    【解决方案1】:

    Intuit 有一个“当前用户”API,可以满足您的要求。您可以在从 Intuit 获得 OAuth 令牌后立即发出此 API 请求,然后在您的应用程序中记录关联。

    这里是它的文档:

    你基本上是向这个 URL 发出 OAuth GET 请求:

    Intuit 会返回这样的响应,其中会提供此人的姓名和电子邮件地址:

    <?xml version="1.0"?>
    <UserResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
      xmlns="http://platform.intuit.com/api/v1">
      <ErrorCode>0</ErrorCode>
      <ServerTime>2012-04-13T18:47:34.5422493Z</ServerTime>
      <User>
        <FirstName>John</FirstName>
        <LastName>Doe</LastName>
        <EmailAddress>JohnDoe@g88.net</EmailAddress>
        <IsVerified>true</IsVerified>
      </User>
    </UserResponse>
    

    【讨论】:

    • 提供的链接不起作用,当我使用获取请求 url 时,我收到一条错误消息 [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 警报握手失败 (_ssl.c:590)
    • @DeadDjangoDjoker 这几乎肯定是你的错误。对我来说很好。发布您的代码。
    • @jameshwartlopez 链接已更新。轻松谷歌搜索找到新的。
    • 嗨@KeithPalmerJr。你能帮我解决这个问题吗? stackoverflow.com/questions/40213837/…
    猜你喜欢
    • 1970-01-01
    • 2016-01-18
    • 1970-01-01
    • 2015-10-24
    • 1970-01-01
    • 1970-01-01
    • 2020-11-10
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多