nest API如何获取access_token

Sha*_* Li 3 nest-api

我从https://home.nest.com/login/oauth2?client_id=CLIENT_ID&state=FOO获得了授权码 .

我想获得access_token,但有些不对劲!

https://api.home.nest.com/oauth2/access_token?code=AUTHORIZATION_CODE&client_id=STRING&client_secret=STRING&grant_type=authorization_code

结果:

url: "/oauth2/access_token?code=xxx&client_id=xxx&client_secret=xxx&grant_type=authorization_code",
message: "404 Not Found"
Run Code Online (Sandbox Code Playgroud)

the*_*imm 8

您需要发送您的请求.此外,授权代码在使用一次后到期,因此您可能需要获得另一个.