Net Atmo login - how to connect?

Since a few years I am using node-red-contrib-netatmo-dashboard.
Today I updated the node and found out, that the login does not work anymore.
It seems that Net Atmo has changed the Authentification process.
With my Client ID, Client secret, username and password I can not connect.
How do I get a refresh token?

Help very much appreciated

You should open an issue on the node's GitHub page so the node's author can address this

I am using node-red-contrib-netatmo (doesnt require the oauth2 credentials.)

But the node you are referring to has documentation on the flow page (in the bottom) how to get the credentials.

1 Like

thanks for your post regarding node-red-contrib-netatmo.
I switched to this node and all works well. I had to change a few pathes but my old credentials are working :slight_smile:

1 Like

It would be nice if you would open an issue on the original node and maybe the author would fix it and that would help others in the future.

Hi Paul,
I did this already before I got the tip of bakman2.
I am waiting for a response.
As soon as I get it, I will let you know.

1 Like

Hi Paul,
please have a look at Netatmo guidelines.

I managed to get my user code but I was not succesfull with Step 4 - Retrieve the access token with the code.

I always get this message: {"error":"invalid_request","error_description":"Invalid grant_type parameter or parameter missing"}

How would you put the link together?

  1. While I can offer some suggestions, I've never used Netatmo
  2. did you follow the steps in the documentation @bakman2 pointed you at?
  3. you don't show what you sent as a request

I think there is nothing wrong with that node.

The problem is getting the token, which needs to be done separately (via OAuth2) which can be quite convoluted.

this is my link that I put together in a little flow.
I x-ed a few numbers of my user code.
Does the content statement go into headers?

[{"id":"7d0f1c8ef7cbe606","type":"function","z":"264e8ddc6a8ee1d7","name":"function 64","func":"delete msg.topic;\ndelete msg.payload;\nmsg.headers =\"Content-Type: application/x-www-form-urlencoded;charset=UTF-8\"\nlet u = \"\";\nlet p = \"grant_type=authorization_code\" + \"&\" +\n\"code=xxxxxxxxdb002c922a6b68202d4d87365\" + \"&\" +\n\"client_id=xxxxxxxad076b72e221919dbc\" + \"&\" +\n\"client_secret=xxxxxxxx6yjx717g98gABh0uiSGgyEsJ\" + \"&\" +\n\"redirect_uri=localhost\" + \"&\" +\n\"scope=read_station\" + \"&\" +\n\"state = Bebefunk\";\nmsg.url = u + p;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":470,"y":340,"wires":[["9a5586f4ca368a78","adcf8213009aa17c"]]},{"id":"adcf8213009aa17c","type":"http request","z":"264e8ddc6a8ee1d7","name":"","method":"POST","ret":"obj","paytoqs":"body","url":"","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":670,"y":340,"wires":[["de9fc90132f0778e"]]},{"id":"9a5586f4ca368a78","type":"debug","z":"264e8ddc6a8ee1d7","name":"debug 109","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":670,"y":400,"wires":[]},{"id":"0536db188c167914","type":"inject","z":"264e8ddc6a8ee1d7","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":280,"y":340,"wires":[["7d0f1c8ef7cbe606"]]},{"id":"de9fc90132f0778e","type":"debug","z":"264e8ddc6a8ee1d7","name":"debug 110","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":870,"y":340,"wires":[]}]

I followed the steps in the docu. Getting the user code was easy and straight forward.

but step 4, which should give me the tokens, comes back with this error message.

The tokens are based on a scope - which scope did you specify on the netatmo app side ?


I also tried Postman, but as this was the first time for me, I have to read the docs first. :frowning:

link to postman Postman

link to a you tube video for postman

Hi Paul, I was able to get my tokens with postman.
It is not difficult when you know how to do it.
postman is a perfect tool for such problems.

1 Like

If you use postman, the links on this picture can be used. Looks very similar in Postman.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.