Hello,
I am using the API with grant_type=password, but I discovered that the access_token that I get it seems to be working with some commands (/homesdata and /homestatus), but if used with /getscenarios returns:
{
"status": "ok",
"time_server": 1653615693,
"body": {
"home": {
"id": "XXXXXXXXXX" (I modified tbe id for privacy)
},
"errors": [
{
"code": 1
}
]
}
}
If run the CLI command:
curl -X POST -d 'grant_type=password&client_id=XXXXPRIVACY&client_secret=XXXXPRIVACY&username=dario.palmisano@XXXXPRIVACY&password=XXXXPRIVACY&scope=read_smarther write_smarther' https://api.netatmo.com/oauth2/token
I get the same (flawed) access_token
while if I run the /getscenarios from https://dev.netatmo.com/apidocumentatio ... tscenarios (which works correctly) I discovered the access_token there specified is different!!!
Moreover the access_token produced by the web works perfectly also for the other /homesdata and /homestatus!!!
Is the procedure described to get the access_token really correct?
May anyone explain me the reason and how to correct?
Thanks in advance
I get a almost wrong access_token
Re: I get a almost wrong access_token
Hello Dario,
We apply "rights levels" to the tokens. For the Try-It function, the token retrieved have a higher access level allowing, for example, to automatically get all scopes without having to ask for it
The goal is to provide a fast and easy tool for testing purposes
The /getscenarios method works for Home + Control and Bubendorff shutters devices only. You retrieve an error because the request is correct (OK 200) but nothing can be shown in the array for a Smarther2
Have a good day,
Leslie - Community Manager
We apply "rights levels" to the tokens. For the Try-It function, the token retrieved have a higher access level allowing, for example, to automatically get all scopes without having to ask for it
The goal is to provide a fast and easy tool for testing purposes
The /getscenarios method works for Home + Control and Bubendorff shutters devices only. You retrieve an error because the request is correct (OK 200) but nothing can be shown in the array for a Smarther2
Have a good day,
Leslie - Community Manager