What is the substitute for this highligted text


because when i run of code from sublime it goes to login page of the bolt cloud i was excepting to go in on and off interface
so how to do that please help me

I don’t understand why you are typing javascript code in sublime text for turning β€˜ON’ and β€˜OFF’ a device.
You can use Bolt cloud for this, type this code as shown below in your bolt cloud code section.
Note: file type must be HTML.

or you can use python code

from boltiot import Bolt
api_key = β€œβ€
device_id = β€œβ€
mybolt = Bolt(api_key, device_id)
response = mybolt.digitalWrite(β€˜0’,β€˜HIGH’)
print(response)

Now you can control your device easily!
Hope this may be helpful.

1 Like

I COPY THIS CODE AND PASTE IT IN NOTEPAD AND OPEN IN CHROME I WAS EXCEPTING DIRECRTLY CONTROLLING INTERFACE SHOULD APPEAR BUT IT IS LOGIN PAGE OF BOLT CLOUD
:pray:

Yes you need to login in the Bolt Cloud to get the device id and api key and use it in the code above(api_key = β€œ here ” device_id = β€œ here ”) .Also u’ll need to connect your product to the bolt cloud. Please go through the course once again to get a clear idea.

1 Like

Dear friend,
if you want to control your device follow this shown step

pls, open the embedded image in the new tab.

1 Like