[Solved] Can you help me make a POST to Shelly using x-www-form-urlencoded calls?

Hooray

Use all the parameters in the URL
image

2 Likes

@muneer I would be very happy if it worked, but this was the first test I had done, but it doesn’t work for me. Can you tell me if you did anything in particular? :frowning:


Cattura4

Cattura2

1 Like

Will send you the details when I’m back home.

1 Like

Thanks, I can’t figure it out, I’m still testing but I can’t get it to work, I don’t understand what I’m doing wrong.
Maybe I can share the project with you to look for the error

1 Like

This is how the full URL should look like

https://shelly-25-eu.shelly.cloud/device/relay/control?auth_key=XXXXXX1dWlkA7346C7C02D00A2803F9DA01D2061F3EXXXXXX74E52C07264554975660A35E61A6598134206A2B&id=XXXX9999XXXX&channel=0&turn=on

image

1 Like

doesn’t work or rather I made a strange discovery.

It works with shared devices that you are not the direct owner of.

So it worked for you with the device I shared with you.

In fact, the response you receive is as follows.

{“isok”:true}

Instead the response from proprietary devices is as follows.

{“isok”:true,“data”:{“device_id”:“e8dbxxxxb098”}}

So in conclusion the solution that worked for you , does not work with proprietary devices that respond with the following error:

{“isok”:false,“errors”:{“wrong_channel”:“Could not control this relay channel!”}}

1 Like

I sent you a PM with a working solution using your device ID and your authentication key.

Sample output
image

2 Likes

The solution is something I have suggested earlier but now I tried it myself and can conform it works.

2 Likes

I want to thank @muneer for your patience and the solution about my big problem

1 Like

:raised_hands:

API Master Muneer!!!

4 Likes

Thank you for your nice compliment

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.