0.00 (0 items )

No products in the cart.

+359 2 988 74 35

Shelly cloud API access

We have added a secure external API to the Shelly cloud, something many customers have requested. This will allow 3rd party programs which you authorize to control your Shelly devices from anywhere through the Shelly cloud.

  1. To use 3rd party cloud API you must to create an account in Shelly cloud App or http://my.shelly.cloud
  2. Associate your Shelly devices to it.
  3. Generate auth_key in Shelly APP.
  4. Copy your server location link

Important:

API is limited to 1 request per second at the moment. For professional or commercial usage contact Shelly Team.

How to generate auth_key in Shelly APP:

Login into Shelly APP, go to User Settings. Click on auth_key. Copy and paste the CloudKey. Copy and paste your server location link

Important:

Do not show this auth_key and/or server location to anyone, if anyone else has it, they can control your devices!
If you change your account password, the auth_key will be changed too.

How to use auth_key

You can execute commands using cloud Key and change ANY device settings.
For Shelly1, Shelly1PM, Shellu2, Shelly2.5, Shelly4pro:
The syntax of the parameters of the POST command is:

POST link: https://[server location link]/device/relay/control/

Keys:
channel=[channel number] – you can check the channel from
Settings->Device informationkey

turn=[command]
id=[deviceID] – you can check the channel from Settings->Device informationkey
auth_key=[auth_key]

Where:
channel number: 0-3 (0 i channel 1, 3 is channel 4)
commands: on or off
deviceID: device id which you want to control. You can copy it from Settings -> Device info
auth_key: The key which you copy paste from your account

 

Example:

Post command Example

For Shelly2 and 2.5 in roller shutter mode:

The syntax of the command for open and close is:

POST link: https://[server location link]/device/relay/roller/control/
Keys: direction=[command]id=[deviceID] – you can check the channel from Settings->Device informationkey auth_key=[auth_key]

Where:
directions: open, close, stop
deviceID: device id which you want to control. You can copy it from Settings -> Device info auth_key: The key which you copy paste from your account.

 

Example:

Open and Close example

The syntax of the command for open and close by percentage is:

POST link: https://[server location link]/device/relay/roller/settings/toposkey

Keys:
pos=[value]
id=[deviceID] – you can check the channel from Settings->Device information
auth_key=[auth_key]

Where:
pos value: 0-100
deviceID: device id which you want to control. You can copy it from Settings -> Device info auth_key: The key which you copy paste from your account.

 

Example:

Open/Close by percentage

For ShellyRGBW2, Bulb and RGBW in color mode

The syntax of the command is:


		

POST link: https://[server location link]/device/light/control
Keys:
turn=[command]
white=[value]
red=[value]
green=[value]
blue=[value]
gain=[value]
key id=[deviceID] – you can check the channel from Settings->Device information
key auth_key=[auth_key]

Where:
turn: on or off
optional:
white, red, green and blue value: 0 – 255
gain value: 0 – 100 it’s only for RGB color

 

Example:

Turn device ON with last set values

Set white to 30%

Turn On and Set white to 30%

Turn On and Set all colors + gain of the RGB

For ShellyRGBW2, Bulb and RGBW in white mode

The syntax of the command is:

POST link: https://[server location link]/device/light/control
Keys:
channel=[channel number]
turn=[command]brightness=[value]id=[deviceID] – you can check the channel from Settings->Device informationkey
auth_key=[auth_key]

Where:
channel=0-4
turn: on or off
brightness=0-100

 

Example:

Turn On and set brightenn to 50

How to control device from IFTTT Webhook?

To control Shelly devices from IFTTT you need to set Webhook as a result of the conditions.
In URL you need to enter the https://[server location link]/[device specific link]Method:POST
Content type: application/x-www-form-urlencoded
Body: all device specific parameters with “&” between them.

 

Example:

Webhook example

Bulk control

You can control multiple devices from the cloud with just one command.
Devices must be from the same type, only relays or roller shutters.

Bulk control for relays Shelly1, Shelly2, Shelly2.5, Shelly1PM, Shelly4Pro:

The syntax of the command is:

POST link: https://[server location link]/device/relay/bulk_control

Keys:
turn=[command]
devices=[{“id”=”device ID”,”channel”=”device channel”},{“id”=”device ID”,”channel”=”device channel”}….]
auth_key=”authorisation key”

Where:
turn: on or off
devices: [{id=”device ID”,channel=device channel} – check device ID from the app.
auth_key: The key which you copy paste from your account

 

Example:

Control multiple devices

IFTT Example:
Content type: application/x-www-form-urlencoded
Body: turn=on&[{“id”:”8015a3″,”channel”:”1″},{“id”:”8015a3″,”channel”:0},{“id”:”c3682a”,”channel”:0″}] &auth_key=lkjd983jijf0430fj430f430fj…

IFTT bulk control example

Join Our Community – Sign up for Our Latest Updates and Exclusive Offers