Closed boc-tothefuture closed 3 years ago
Hi! Sorry I'm late to reply. I was under the impression I was automatically watching the thread, since I "own" the code. Normally that error means your credentials no longer work, and you have to recreate the config file.
Was this with the newest version of the script?
This is the newest version of the script. I am getting this error when I am creating the config file. They do work if I manually go through the oauth process.
So, you run Oauth and get a bearer-token, which you then feed into the config file, and then it works?
Interesting. In order to use Miele's Oauth, we perform a post of email-address, password, client ID and country-ID. In a public script, I wouldn't insert anything that would reveal passwords and such, but if write the following to line 173 in the script:
print "Postdata: " . $postdata . PHP_EOL;
You should at least be able to see what data we are trying to send to Miele. My only guess would be if your password contains characters that PHP is not happy with, but as we URL-encode the data, i don't really see what characters that would be.
I have a same error on first call. The Page in the Response say, that I have to accept the access. After I do the same Request with the swagger-API from the miele site, I get a Website to login and accept the access. After this, the Script works fine also with the same client_id.
I have a same error on first call. The Page in the Response say, that I have to accept the access. After I do the same Request with the swagger-API from the miele site, I get a Website to login and accept the access. After this, the Script works fine also with the same client_id.
Ok, interesting. Since I have already accepted this for my account, and my ClientID, I don't get that any more. This explains a lot! The best thing would naturally be to be able to present that page, but it is kind of hard to do in a script...
Yes, I think so too. It's very hard. Perhaps the manual way is the best option and explain it in the readme? It's only a one-taske-at-all-action - so the overhead for the script is to much, I think.
Yeah, agreed. -But still, the "refresh_token" process of Oauth2 doesn't seem to be implemented with Miele, so we still need to reauthenticate every three months or so...
After asking on a different forum about the refresh_token process, I was told it is in a different section of the documentation to where I was looking for it. -So it is there, it is clearly documented, and can be added. -So, completely my bad. I will start looking into refreshing tokens now.
I hope to be able to look into token refreshing and such next week, in order to create a good Easter release :-)
I have now added support for refreshing the access token. Therefore, I believe this has been resolved. I will close this issue, and I guess it can be reopened if you are still experiencing errors.
Everytime I attempt to use the script, I receive the following error.
I seem to be able to enable to get it to work using https://oauthdebugger.com/
Are there any suggestions for debugging a failing oauth with this script?