我正在使用以下链接中的代码来更新 Intuit QuickBooks 集成的访问 token 。
https://gist.github.com/IntuitDeveloperRelations/7259345
但是,我无法测试此代码,因为 intuit 仅在 token 创建日期后 150 天后才更新其访问 token ,并且我仅在几天前创建了 token 。所以我不知道输出。现在,它正在生成带有错误消息的 xml 响应。
现在这个方法返回给我一个似乎是访问 token 的字符串。我还需要更新 Access Token Secret 吗?如果是,那么如何生成它?或者输出也包含 secret ?
实际上,你能给我这个方法的输出吗?
最佳答案
成功的响应如下所示:
<ReconnectResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://platform.intuit.com/api/v1">
<ErrorMessage/>
<ErrorCode>0</ErrorCode>
<ServerTime>2012-01-04T19:21:21.0782072Z</ServerTime>
<OAuthToken>qye2eIdQ5H5yMyrlJflUWh712xfFXjyNnW1MfbC0rz04TfCP</OAuthToken>
<OAuthTokenSecret>cyDeUNQTkFzoR0KkDn7viN6uLQxWTobeEUKW7I79</OAuthTokenSecret>
</ReconnectResponse>
引用 Intuit 的 documentation .
请注意,您将获得一个新 token 和一个您应该存储的新 token secret 。
请记住,您可以使用 Intuit's OAuth Playground生成生命周期较短的 token 以进行测试。
关于oauth - 如何更新 Intuit QuickBooks 与 .net 应用程序集成的访问 token secret ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24675145/