0

我正在尝试将我的技能链接到我的 OAuth 2.0 服务器。我正在使用“授权代码授予”。

在我的服务器中,我从 Alexa 收到:

{ client_id: 'alexa-skill', response_type: 'code', state: 'eyJpbml0VmVjdG9yIjoiTWYyemxRaGh6MGtScm9wUW8rRlE4dz09IiwicGF5bG9hZCI6InFQOTBDNW1TY2xueEcxbXFpaEpkcEJqYjRBNTFOa0VIazJHSjJLWERHL1NYQTRaa0tQL1MwMk5lVUlYSkE4NExXdVhXdkx5Q0JWVU52R28waTV0UkRqOGxZVk4rdEpxVmVEQ0ljT1hldXBnWkRseWZFUHY5MmJqb05CSk9ZWjFSYnh5ck5WdzB6NTRmOWU4a2JwRWJHMGVGRWJXS0ErMmhQSzRlajFLT3pjY2dxeVNxNm1hNS9UWENoU3lwYTJRS1k3ekdnN2VXbFNhd2FhN0twVjVhVlltbDRnMVFBY2h1QnBZVjdIUnEzVm5RVnVTY0JFVnlpbFJnOXludFIyRWpJY3JwTTArNjlESW53L3lqY05mdEJSaHdjSTNSQzdVbjd0TDQ5Q1NnZjB1cGFXS3pWNElFbWFZTVRPWERFc3d5cC9nWjd0eDF1SExnaHpEcCtCSVpNWXdzOWMrK2xib2N1YWl0UmhzaUFGbjJxTmxwV0ZOQzh4TkE5OXhVcUJxSVA0dDJXSkhCdUxnLzJzakJtMG1Wd0lySzFBUUhrUkkrVE5Cc0ROemFnUGhMVjdRQzgyZVdneG1EeFdVSThHZFNkRjJEL2ozb0NNYi83b1pGMlp3SXhIWG9WTGJ6azJOWGNwTk5WUkVzQ3ByODgyYW1MeFR3SUlhUWFQL1VVRFQydy85ckxBenVDUi9pN2UxREZxZW5kaXJzRXlwSnJ0RDQ4Wm05ZmtpTzR5YktiSUYwY2RPVU8vMi8yclJpcmZ5ZWFOWmt6SVNJNkRLUi9mQllXc0FVR3M2MXU0WTlaaktTc21DNCtPUWxieFRhOE1GeWFDNUFiaWJoLzFYR2xEQUpsaHIrVEloeWxrUDU0N1ltNWU4MGQyYndxSkxmVmNtcU1OelFHQUtkMWV3VjZyd3hwMXJiWTlnOGNVT3pqWUtYc05jMlRaSUVpUVN4U2FzQ2MxRVVQKzV1aldpeTdYMWlCb0VYZEtBRTBlQzM3MTFvbGlZNVVjL0FDS1pOWW1KUTBqUHJDdmpjU0Uxbk5KT2toaFJJOEhzUnArdjZlYmdWc2V2aDUwWk9aVm9RNlQ5bU5UZmhONzBDVFRVMjNLeS92am4vaE42c1N2YzNNeW4xT0lJMmNkODRRQVp5TFZJVkwwcjhWVWg0TFV2UTdaazV6ZW1OaTRDTTl0Vi95T2RiMUJkUGhSZ2hHQVozU1VOR3Z5aDA5QT09IiwidmVyc2lvbiI6MX0', redirect_uri: 'https://pitangui.amazon.com/api/skill/link/1111111111' }

在此之后,我尝试重定向到以下网址:

https://pitangui.amazon.com/api/skill/link/1111111111?state=eyJpbml0VmVjdG9yIjoiTWYyemxRaGh6MGtScm9wUW8rRlE4dz09IiwicGF5bG9hZCI6InFQOTBDNW1TY2xueEcxbXFpaEpkcEJqYjRBNTFOa0VIazJHSjJLWERHL1NYQTRaa0tQL1MwMk5lVUlYSkE4NExXdVhXdkx5Q0JWVU52R28waTV0UkRqOGxZVk4rdEpxVmVEQ0ljT1hldXBnWkRseWZFUHY5MmJqb05CSk9ZWjFSYnh5ck5WdzB6NTRmOWU4a2JwRWJHMGVGRWJXS0ErMmhQSzRlajFLT3pjY2dxeVNxNm1hNS9UWENoU3lwYTJRS1k3ekdnN2VXbFNhd2FhN0twVjVhVlltbDRnMVFBY2h1QnBZVjdIUnEzVm5RVnVTY0JFVnlpbFJnOXludFIyRWpJY3JwTTArNjlESW53L3lqY05mdEJSaHdjSTNSQzdVbjd0TDQ5Q1NnZjB1cGFXS3pWNElFbWFZTVRPWERFc3d5cC9nWjd0eDF1SExnaHpEcCtCSVpNWXdzOWMrK2xib2N1YWl0UmhzaUFGbjJxTmxwV0ZOQzh4TkE5OXhVcUJxSVA0dDJXSkhCdUxnLzJzakJtMG1Wd0lySzFBUUhrUkkrVE5Cc0ROemFnUGhMVjdRQzgyZVdneG1EeFdVSThHZFNkRjJEL2ozb0NNYi83b1pGMlp3SXhIWG9WTGJ6azJOWGNwTk5WUkVzQ3ByODgyYW1MeFR3SUlhUWFQL1VVRFQydy85ckxBenVDUi9pN2UxREZxZW5kaXJzRXlwSnJ0RDQ4Wm05ZmtpTzR5YktiSUYwY2RPVU8vMi8yclJpcmZ5ZWFOWmt6SVNJNkRLUi9mQllXc0FVR3M2MXU0WTlaaktTc21DNCtPUWxieFRhOE1GeWFDNUFiaWJoLzFYR2xEQUpsaHIrVEloeWxrUDU0N1ltNWU4MGQyYndxSkxmVmNtcU1OelFHQUtkMWV3VjZyd3hwMXJiWTlnOGNVT3pqWUtYc05jMlRaSUVpUVN4U2FzQ2MxRVVQKzV1aldpeTdYMWlCb0VYZEtBRTBlQzM3MTFvbGlZNVVjL0FDS1pOWW1KUTBqUHJDdmpjU0Uxbk5KT2toaFJJOEhzUnArdjZlYmdWc2V2aDUwWk9aVm9RNlQ5bU5UZmhONzBDVFRVMjNLeS92am4vaE42c1N2YzNNeW4xT0lJMmNkODRRQVp5TFZJVkwwcjhWVWg0TFV2UTdaazV6ZW1OaTRDTTl0Vi95T2RiMUJkUGhSZ2hHQVozU1VOR3Z5aDA5QT09IiwidmVyc2lvbiI6MX0&code=Akasa7I91495468793321

带有消息“无法链接您的 OAuth 技能”的 Alexa APP 加载页面

我做错了什么?

4

1 回答 1

0

验证从 Oauth2.0 系统返回的令牌是否是这种格式:

{
   "access_token":"2YotnFZFEjr1zCsicMWpAA",
   "token_type":"example",
   "expires_in":3600,
   "refresh_token":"tGzv3JOkF0XG5Qx2TlKWIA",
   "example_parameter":"example_value"
 }

请在此处参考此 Oauth2.0 文档

于 2017-06-06T09:27:44.040 回答