3

I got the authorization code from https://home.nest.com/login/oauth2?client_id=CLIENT_ID&state=FOO.

I want to get the access_token, but something wrong!

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

Result:

url: "/oauth2/access_token?code=xxx&client_id=xxx&client_secret=xxx&grant_type=authorization_code",
message: "404 Not Found"
Noich
  • 14,631
  • 15
  • 62
  • 90
Sha-Pai Li
  • 157
  • 3
  • 15

1 Answers1

8

You need to POST your request. Also, the authorization code expires when used once, so you may need to get another.

thesimm
  • 774
  • 3
  • 12