Jump to content
Gen2 Devices: FW Update Required / Gen2 Geräte: FW-Update erforderlich ×

Login not possible anymore


PhiPa

Recommended Posts

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?

Link to comment
Share on other sites

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.

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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 😃

 

Link to comment
Share on other sites

  • 2 weeks later...

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>"

 

 

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...