Search code examples
nest-api

android-NestDK stuck with pincode


I'm trying to figure out how to connect my NestDK app to the nest API. After Login in with my user and password, I am getting a "Use this Pincode to connect with Nest. XXXXXX". What am I supposed to do with this ? I expected the access_token request to be happening in the background but I get stuck on this page.

I set REDIRECT_URL to https://api.home.nest.com/oauth2/access_token?client_id=[myClientId]&code=AUTHORIZATION_CODE&client_secret=[myClientSecret]&grant_type=authorization_code

Any idea ?

Thanks


Solution

  • I finaly found my mistake.

    The REDIRECT_URL is to be set in the client registration page on the nest developer website and NOT ONLY in Constants.java.

    I put http://localhost/ on both location and it worked immediatly.