Alexa无法链接您的OAuth技能

时间:2017-05-22 16:05:07

标签: oauth-2.0 alexa alexa-skill alexa-app

我正在尝试将我的技能链接到我的OAuth 2.0服务器。 我正在使用“Auth Code Grant”。

在我的服务器中,我从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

Alexa APP加载页面,上面显示消息“无法链接您的OAuth技能”

我做错了什么?

1 个答案:

答案 0 :(得分:0)

验证从Oauth2.0系统返回的令牌是否采用以下格式:

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

请参阅此Oauth2.0文档here