Web Service REST (http request)

Status
Not open for further replies.

FirstPoint

Titanium Partner
Joined
Oct 3, 2022
Messages
71
Reaction score
4
I am trying to make an HTTP GET request using the "Web Service REST" block in 3CXcfd.
The URL is [http://admin:MY_PSW@MY_IP/relay/0?turn=toggle], and when I test it in a web browser, replacing it with the appropriate data, it works.
I am confident that the credentials are correct, as they are manually set on the device I am trying to control via the HTTP request [(Shelly 1 mini Gen3) relay].
I tried following the procedure mentioned in a previously resolved post, but it does not work.
I am attaching the configuration of the "Web Service REST" block, which returns a 401 error.

1725457341470.png

If it helps, I am also attaching what appears when I try the URL in a browser.
1725458700252.png
 
A 401 response code means "unauthorized", i.e. invalid credentials. So, or you're sending wrong credentials, or you're sending them in a wrong format. Check with your browser developer tools how these credentials are being sent (request headers), and then emulate the same from the CFD component config.
 
  • Like
Reactions: Evolute IT
Status
Not open for further replies.

Forum statistics

Threads
111,973
Messages
590,078
Members
164,896
Latest member
sameage