Browse topics, discover Works With Legrand community!

Forum Replies Created

Hi Leslie, thank you again for your help. I do not know the reason why but right now I am able to get plant ID and plant topology.

Now I am facing another issue... 🙂 I am trying to get the status of a light and I am trying to set the status of a light. I am receiving this error when reading the status

{"errors":[{"userMessage":"","internalMessage":"At least one of these scopes missing:","code":303}]}

and this error when I am writing the status:

{"errors":[{"userMessage":"","internalMessage":"At least one of these scopes missing: light.write","code":303}]}

Could you help me again?

Thank you!



Hello Leslie,

about my issue I did some further investigation. The error I am receiving is "Unauthorized. Supplied access token is invalid or doesn\'t include required scope(s)."}'".

I tried with the "Try" button and it works, I tried with my app with no success. I did another test using the token generated with the Try button into my application, with no success.

I read another user had a identical issue months ago (Giancarlo is the name), he solved creating a new app.

Please let me know.


OK I will try later. What I can observe is that the token I have is not starting with string "Bearer " but it is starting with the long strings of letters and numbers. Could it be the root cause?


Hi Leslie,
something strange. Using the Try button I can retrive the plantID, but using the get from Python I am receiving the error 404.

Any idea?


Hi Leslie,

it is me again. I have some more question, but I do not know if we are in the right section of the forum.

Now I have my token, I have the refresh token. The refresh flow is working as well since I am receiving message 200OK.

Next step is to retrive my plantId by means of the proper API using into the header the token and the subscription key and a get request.

I am receiving this message:

{ "statusCode": 404, "message": "Resource not found" }

What does it mean? Thank you again for your support.


Thank you! I got it now.



Hi Leslie! Thank you for your support. I am able to get the token and I am able to refresh the token using the refreshtoken.

Now I am trying to gain access to my plant, I am trying to turn on/off lights. One of the parameters I need to pass to the request is the Ocp-Apim-Subscription-Key that is contained into the subscription.

All the time I a trying to access to the my subscription page I am receiving the following message:
"User already registered
It seems a user with this email is already registered in the system. If you forgot your password, please try to restore it or contact our support team."

Could you help me?


Hi Leslie,

I am your nightmare.... I know.

Following your suggestion and your tutorial I prepared the post request (address and I put the parameter into the body.

I received the following response:

<Response [400]>
"error": "invalid_grant",
"error_description": "AADB2C90080: The provided grant has expired. Please re-authenticate and try again. Current time: 1603393355, Grant issued time: 1603392703, Grant expiration time: 1603393003\r\nCorrelation ID: 7e4577a2-c953-4b22-ab1a-ea9219b47ae2\r\nTimestamp: 2020-10-22 19:02:35Z\r\n"

It seems that the code is expired, am I wrong?

Please give me your directions.


Hi Leslie,
I have two questions.

1) during the retrival of token (POST), I am receiving error 500. From the documentation is related to an internal server error.

2) how long is the string with the code? The code I received is a very long string. Is it right?

Thank you again for your support.

Hi Leslie, thank you very much.

I will try this and I will let you know.


Hi Leslie,
in fact at the time I defined the application I choosed the "Appllication". After your validation you returned a special URI.

As I said at the beggining of this post, following your tutorial I did the GET request where I put as "redirect_uri" the special URI. The get returned me a message like "OK 200". But I cannot find the "code".

Could you provide me some examples?

Thank you for your support.

Hi Leslie,

it is not a mobile app, as I said it is a python script running on raspberryPi. The example you provided is related to the developement of a server, while I am implementing a client. Moreover the redirecting URI must be the sme URI provided by Legrand during the definition of the app.

Do you have some more info?


Hi Leslie,

if you define your application as Application, you do not have a redirection uri (I mean something like a web address).

What I am doin is a python application that is running on a raspberryPi. The application will connect to the Legrand system to activate or deactivate a light. So I do not have a user interface.

So how the oauth2 works in such a case?


Hi Leslie, thank you for your quick reply. Is the authorization code valid forever?


Viewing 15 posts - 1 through 15 (of 15 total)