API development error

Hi , im unable to digital write and every time i write this line of code in the browser some error pops. Im unable to continue further . I have used the code as per the documentation but unable to compile . Am i missing anything please help me here !!!

Code below:

Hi @mohamedabrez,

Check this thread In module home automation project 3 controlling led

Also share the screenshot of the error.

Do let me know in case you need any other information.

buddy use the code in this way if using html