Привет. Как обычно, наверное все дело в кривык руках, но все же спрошу. Может одним взглядом поймете где я косякнул.
Получаю "Не получилось обновить список устройств". Шаг 3 смотрел.
название домена здесь заменю на domen
Снаружи доступны:
https://domen:9443/modules/yandexhome/authorize.php {"error":"invalid_client","error_description":"No client id supplied"}
https://domen:9443/modules/yandexhome/token.php {"error":"invalid_request","error_description":"The request method must be POST when requesting an access token","error_uri":"http:\/\/tools.ietf.org\/html\/rfc6749#section-3.2"}
https://domen:9443/modules/yandexhome/smarthome.php http error 400 но если
https://domen:9443/modules/yandexhome/s ... er/devices то говорит {"success":false,"message":"Access is denied."}
Авторизации на мажордомик нет. Сертификат в порядке. Делал через NGINX. fastcgi_param PATH_INFO $fastcgi_path_info; прописывал.
делал по такому принципу:
location /modules/yandexhome/authorize.php {
proxy_pass http://%localip%/modules/yandexhome/authorize.php;
}
Пересоздавал навык, перегенеривал oath. Мажордомик не на реверс прокси, а на соседнем серваке
В логах:
15:30:17 0.10980500 GET /modules/yandexhome/smarthome.php/v1.0/user/devices 192.168.0.5 <<< []
14:59:05 0.12873400 token.php >>> HTTP/1.1 200 OK
Cache-Control: no-store
Content-Type: application/json
Pragma: no-cache
{"access_token":"5549ebf45052c2cdc1573074efebd660cd40537e","expires_in":604800,"token_type":"Bearer","scope":null,"refresh_token":"55cbdc3f1a8f80385408d4d1bac043f0624d3913"}
14:59:05 0.10473300 POST /modules/yandexhome/token.php 192.168.0.5 <<< {"code":"ea4fc2e7571239e2a661d0b9f1da77f38e9b574a","client_secret":"%secret%","grant_type":"authorization_code","client_id":"2a46b516647a-4e5fa4da","redirect_uri":"https:\/\/social.yandex.net\/broker\/redirect"}
14:59:04 0.53770000 authorize.php >>> HTTP/1.1 302 Found
Content-Type: application/json
Location:
https://social.yandex.net/broker/redire ... 2Fcallback
14:59:04 0.51069900 POST /modules/yandexhome/authorize.php?state=https%3A%2F%2Fsocial.yandex.ru%2Fbroker2%2Fauthz_in_web%2F9d59b2380b7e423199cc999a5bb4a7c9%2Fcallback&redirect_uri=https%3A%2F%2Fsocial.yandex.net%2Fbroker%2Fredirect&response_type=code&client_id=2a46b516647a-4e5fa4da 192.168.0.5 <<< {"authorized":"yes"}
14:57:44 0.02209500 POST /modules/yandexhome/authorize.php?state=https%3A%2F%2Fsocial.yandex.ru%2Fbroker2%2Fauthz_in_web%2F9d59b2380b7e423199cc999a5bb4a7c9%2Fcallback&redirect_uri=https%3A%2F%2Fsocial.yandex.net%2Fbroker%2Fredirect&response_type=code&client_id=2a46b516647a-4e5fa4da 192.168.0.5 <<< {"login":"%secret%","password":"%secret%"}
14:56:35 0.84119500 GET /modules/yandexhome/authorize.php?state=https%3A%2F%2Fsocial.yandex.ru%2Fbroker2%2Fauthz_in_web%2F9d59b2380b7e423199cc999a5bb4a7c9%2Fcallback&redirect_uri=https%3A%2F%2Fsocial.yandex.net%2Fbroker%2Fredirect&response_type=code&client_id=2a46b516647a-4e5fa4da 192.168.0.5 <<< []
14:54:56 0.00648500 GET /modules/yandexhome/authorize.php?state=https%3A%2F%2Fsocial.yandex.ru%2Fbroker2%2Fauthz_in_web%2Fb9694deebc324a9bbf33ac4be68da8f7%2Fcallback&redirect_uri=https%3A%2F%2Fsocial.yandex.net%2Fbroker%2Fredirect&response_type=code&client_id=Majordomo%20v2%20by%20Willy 192.168.0.5 <<< []