PhiPa Posted July 9 Share Posted July 9 Hello, since yesterday i am not able to query the Shelly cloud anymore. POST - https://shelly-76-eu.shelly.cloud/device/status Body: "id" - "xxxx" "auth_key" - "xxxx" I always get the error now: { "isok": false, "errors": { "invalid_token": "The login information is invalid! Please login again!" } } Â I already changed my password to generate a new token but even this did not help me :-(. What can i do? Quote Translate Revert translation? English (American) Finnish French German Italian Portuguese (European) Spanish Link to comment Share on other sites More sharing options...
Todor Tsvetkov Posted July 9 Share Posted July 9 Hello! We just tested POST call for device status from POSTMAN, and it's working just great. Make sure in your script you are using the right parameters for cURL and POST. For PHP for example use "curl_setopt($ch, CURLOPT_POST, 1);", if instead is used "customrequest". And send the data for "curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));" Note that, if the POST is working from another software, then the cloud logic on the Shelly side have no issue. Â Quote Translate Revert translation? English (American) Finnish French German Italian Portuguese (European) Spanish Link to comment Share on other sites More sharing options...
PhiPa Posted July 9 Author Share Posted July 9 Thanks for you response, it worked several month now with my n8n workflows and then it stoped working without any change :-(. Can not get it to work with postman or n8n when using my credentials i get from https://control.shelly.cloud. What else can i try? Quote Translate Revert translation? English (American) Finnish French German Italian Portuguese (European) Spanish Link to comment Share on other sites More sharing options...
PhiPa Posted July 9 Author Share Posted July 9 I found the problem, you are not allowed to send the parameter via body anymore. When i send it as query parameter it works. Will rebuild my workflows, so it will work again. Thanks for help. Quote Translate Revert translation? English (American) Finnish French German Italian Portuguese (European) Spanish Link to comment Share on other sites More sharing options...
Todor Tsvetkov Posted July 10 Share Posted July 10 14 hours ago, PhiPa said: I found the problem, you are not allowed to send the parameter via body anymore. When i send it as query parameter it works. Will rebuild my workflows, so it will work again. Thanks for help. Thank you! What changes you made on your script? Quote Translate Revert translation? English (American) Finnish French German Italian Portuguese (European) Spanish Link to comment Share on other sites More sharing options...
PhiPa Posted July 11 Author Share Posted July 11 In the past, i did send the information via body: { auth_key: "xxxx", id: "xxxxx" } But this does not work anymore since 2024-07-08 15:00 GMT+02:00. I now send it directly as query parameter in the URL as it works: https://shelly-76-eu.shelly.cloud/device/status?id=xxxx&auth_key=xxxx I would prefer the body, but i think it will be fine this way. The length and encoding should no problem for the url with the basic inputs of id and auth_key 😃  Quote Translate Revert translation? English (American) Finnish French German Italian Portuguese (European) Spanish Link to comment Share on other sites More sharing options...
tormod.santana Posted July 21 Share Posted July 21 Same problem here. This is highly unprofessional doing braking API changes to existing API - I have to rewrite my working code. Â Speaking of unprofessional, the documenation is still wrong on the official page (https://shelly-api-docs.shelly.cloud/cloud-control-api/communication): curl -X POST https://<server_uri>/device/status -d "id=<device_id>&auth_key=<auth_key>" Â Â Quote Translate Revert translation? English (American) Finnish French German Italian Portuguese (European) Spanish Link to comment Share on other sites More sharing options...
Fabrice Gabor Posted July 23 Share Posted July 23 On 21.7.2024 at 10:46, tormod.santana said: Same problem here. This is highly unprofessional doing braking API changes to existing API - I have to rewrite my working code.  Speaking of unprofessional, the documenation is still wrong on the official page (https://shelly-api-docs.shelly.cloud/cloud-control-api/communication😞 curl -X POST https://<server_uri>/device/status -d "id=<device_id>&auth_key=<auth_key>"   Hi! Clearly not professional, I do agree! Thank you to @PhiPa for the "solution"! I implemented it in a Jeedom Plugin. Nice day everyone! Fabrice Quote Translate Revert translation? English (American) Finnish French German Italian Portuguese (European) Spanish Link to comment Share on other sites More sharing options...
soinipe Posted July 26 Share Posted July 26 (edited) For somebody who hits this page later, I had spelling mistake, my bad: Worked before "https://shelly-50-eu.shelly.cloud/device/status&id=xxxx&auth_key=xxxx" with "&" instead of "?". Requires now syntax:Â "https://shelly-50-eu.shelly.cloud/device/status?id=xxxx&auth_key=xxxx". Â Edited July 26 by soinipe typo Quote Translate Revert translation? English (American) Finnish French German Italian Portuguese (European) Spanish Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.