-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Alternative authorisation #114
Comments
On my side it seems that token never expire... I use one that is ok since at least 6 month. |
It gives an authorisation error after a couple of weeks. Creating a new token solves it. So it must me expiring. This experience is also built into for instance the domoticz plugin. |
For me it doesn't expire as well, so not sure what goes wrong in your way. Can you share the link to the specific code / retry logic in the Domoticz plugin? |
That is very weird... Can I ask you guys for the API call you're using to create the token? |
Creating the token is not a API as such, more a http request capturing a SESSION COOKIE. This is what I'm doing : https://github.com/flhoest/somfy/blob/main/syFramework.php check the first function (function syGetToken), this is a 3 steps mechanism. |
That seems to be the API I'm using as well. I was curious if that was also using the devmode parameter. And it seems to be. No difference there |
Don't you talk about 2 different things ?
@MikeyMan83, are you indeed talking about the second one ? |
And to add some elements, I call generate a token API through PostMan, that translates my call this way : curl --location 'https://ha101-1.overkiz.com/enduser-mobile-web/enduserAPI/config/xxxxxx/local/tokens/' and i get a token that never expires. $this->authClient = new Client([
[...] $activateTknResponse = $this->authClient->request(
|
Thanks for the feedback. I'm manually using postman to do a login, generate and activate call.
|
The JSESSIONID will expirate. This is not the token. |
This is exactly what I described and do in my function mentioned above ... #114 (comment) |
So just take that out of the standard API when creating? tick box is off though. |
Sorry but I don't understand your problem indeed. Let's sum up again. In answer to this request, you get a token in the body Activate it by putting in body of POST request https://github.com/Somfy-Developer/Somfy-TaHoma-Developer-Mode#generate-a-token This token, once activated, can be use in local calls to your thaoma and never expires. |
So; based on the hints here, i tried to create and activate a token without the E1~ prefix. |
Hi, And you say when creating a new token, you don't get this error anymore ? Again, I don't think its a matter of token expiration, token never expires. |
Hi, <!doctype html><title>HTTP Status 400 – Bad Request</title><style type="text/css">body {font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b {color:white;background-color:#525D76;} h1 {font-size:22px;} h2 {font-size:16px;} h3 {font-size:14px;} p {font-size:12px;} a {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style> HTTP Status 400 – Bad RequestRegards Andro |
Hi all,
I'm using node red in combination with this developer API.
This works fine. For a while that is.
At intermittent periods, the token seems to get invalid. And i'm confronted with sunscreens that are not working.
This is driving me absolutely mad tbh.
Generating and activating a new token, and keeping track of the old ones is too much maintenance for something running on my own network.
I really need a simpler autorisation for local access. Is there any way we can look into this?
Even creating an indefinite token would be better than this.
The text was updated successfully, but these errors were encountered: