我正在开发一个产品的解决方案,并试图实现C2C连接。我被困在通过OAuth链接SmartThings和我的后端。
我收到请求
{
"lifecycle": "CONFIGURATION",
"executionId": "41d224ba-7de3-77ac-fe87-a56fa6f325c3",
"locale": "en",
"version": "0.1.0",
"client": {
"os": "ios",
"version": "1.6.17",
"language": "uk"
},
"configurationData": {
"installedAppId": "7393625f-64d5-42cb-a52f-7935a677c4bb",
"phase": "PAGE",
"pageId": "linkPage",
"previousPageId": "",
"config": {}
},
"settings": {}
}并返回响应,在SmartThings应用程序中呈现:
{
"configurationData": {
"page": {
"pageId": "linkPage",
"nextPageId": "",
"previousPageId": "",
"complete": true,
"name": "Account Linking",
"sections": [ {
"name": "Please, link SmartThings to your XXXXXX account",
"settings": [ {
"id": "linkAccount",
"name": "Link Account",
"type": "OAUTH",
"required": true,
"urlTemplate": "https://xxxxxx.auth.us-east-2.amazoncognito.com/login?response_type=code&client_id=20kucf9dcg5ju9deqeppugqft1&state=7393625f-64d5-42cb-a52f-7935a677c4bb&redirect_uri=https%3A%2F%2Fapi.smartthings.com%2Foauth%2Fcallback"
} ]
} ]
}
}
} 身份验证成功通过,并将代码返回给回调,如下所示:https://api.smartthings.com/oauth/callback?code=9dfea1ca-54e8-47e8-ba90-24f20068ad2b&state=7393625f-64d5-42cb-a52f-7935a677c4bb
但是回调返回HTTP401。
我已经阅读了这个主题https://community.smartthings.com/t/cloud-to-cloud-oauth-rest-api/118902,但没有找到解决方案。我在网上找不到更多有用的信息了。
有没有人成功地实现了这一点?
支持太糟糕了--好几天都没有回应。根据我之前的支持联系经验-他们可以在几周后响应...
谢谢!
发布于 2018-12-16 17:43:16
这是一个iOS SmartThings应用程序的错误,Android运行正常。https://community.smartthings.com/t/cant-implement-oauth-for-cloud-to-cloud/143258/7
https://stackoverflow.com/questions/53448264
复制相似问题