dimaj
dimaj

Reputation: 3

API does not return anything except for metadata object

Was hoping someone could help me with this.

I've created a new "product" on developer.nest.com and gave it all available permissions with read/write access where available. My product is using code authentication, so after following all steps to get the code, it was time to make some requests.

When I got the "Exchange the authorization code for an access token" of the walkthrough, I did not get anything other than the metadata object. There was nothing about my devices or structures.

What am I doing wrong?

Thanks.

Upvotes: 0

Views: 122

Answers (2)

Lionel Iorgulescu
Lionel Iorgulescu

Reputation: 286

You are most likely authorizing the Works with Nest connection using a Family Account. Only the home "owner" can currently access the Nest structures and associated devices.

Upvotes: 0

Lionel Iorgulescu
Lionel Iorgulescu

Reputation: 286

The metadata object is not part of "Exchange the authorization code for an access token" flow. If you are seeing metadata you must've received an access token and made an API request to https://developer-api.nest.com. This is where you would see the metadata object. As part of the "Exchange the authorization code for an access token" your response should be an access token and expiration, e.g.

{ "access_token": "c.FmDPkzyzaQe...", "expires_in": 315569260 }

Upvotes: 0

Related Questions