The URL is not shown in my server, so I tried from my laptop. I need to install paho-mqtt before in addition to the README Python libraries to execute xee2mqtt.py. After that, I get the URL (/authorize) but I get an error: The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed
https://api.xee.com/v4/oauth/authorize?response_type=code&client_id={{client_id}}&redirect_uri=https%3A%2F%2Flocalhost%2F&scope=vehicles.read+vehicles.signals.read+vehicles.locations.read+vehicles.events.read+vehicles.accelerometers.read+vehicles.devices-data.read+account.read+vehicles.management&state=z1F1SgbH5rp0ApgkJPjlWtbZcvCRl1
That URL has more query parameters than the /authorized URL that worked for me:
Very strange… Couldn’t you ssh to it?
If you run the code on another machine you will have to save the token file and upload it to your server.
When do you get there error? After entering auth return code it’s that? Have you update your apps permission to authorize new scope needed? Did you apply all things in the README?
I do not understand the first part how is it possible to not have the link display on your server, that’s very strange. It’s pure python (a simple print function).
Yes, I enter by ssh to it. But the script first execution doesn’t work for me even in my laptop. Can you provide an example of json file where the script save the config? I already have an access and refresh token that I got previously.
I have added the scopes missing in my app client:
Please enter your authorization_code: <I paste the code here>
Traceback (most recent call last):
File "xee2mqtt.py", line 47, in <module>
with open(xee_config_file, 'rb') as xee_token_file:
FileNotFoundError: [Errno 2] No such file or directory: 'xee.json'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "xee2mqtt.py", line 64, in <module>
token, error = xee.get_token_from_code(authorization_code)
....
oauthlib.oauth2.rfc6749.errors.InvalidGrantError: (invalid_grant) The provided authorization grant (e.g., authorization code, resource owner credentials) or refresh token is invalid, expired, revoked, does not match the redirection URI used in the authorization request, or was issued to another client.
yes, I can create the xee.json file in the same path. I’m sure is not a permission issue. I have run your xee2mqtt.py script in a debugger (Visual Studio Code). The issue for me is the line: token, error = xee.get_token_from_code(authorization_code).
Bonjour’ je suis tout nx sur ha et je n’arrive pas à installer python. J’utilise un ha avec une image et son os sous odroid. L’orque j’essaye d’installer python il ne reconnaît pas la cde?
Avez vous des pistes d’aides à m’indiquer?