Преглед на файлове

修复refresh_token赋值问题

locky преди 1 година
родител
ревизия
f67ddd141c
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      Controller/alexa/AlexaController.py

+ 1 - 1
Controller/alexa/AlexaController.py

@@ -146,8 +146,8 @@ class AppToAppView(View):
         try:
             # 使用刷新令牌获取新的访问令牌
             # https://developer.amazon.com/zh/docs/login-with-amazon/authorization-code-grant.html#using-refresh-tokens
-            amazon_refresh_token = alexa_oauth_qs[0]['amazon_access_token']
             alexa_api_endpoint = alexa_oauth_qs[0]['alexa_api_endpoint']
+            amazon_refresh_token = alexa_oauth_qs[0]['amazon_refresh_token']
 
             amazon_base_uri = 'https://api.amazon.com'
             url = amazon_base_uri + '/auth/o2/token'