Nickolaim / AirThingsForHubitat

Hubitat driver for AirThings API
Apache License 2.0
0 stars 0 forks source link

Authentication Token Error #3

Open kevincrots opened 2 years ago

kevincrots commented 2 years ago

Hello @Nickolaim

I'm utilizing your Airthings Hubitat driver and am running into token authentication issues. I've followed your directions and have the Hubitat setup with Machine2Machine client credentials with both the Client ID and the Secret ID along with the device ID. When I go to use it in the logs I get a few errors: image

image

If I set it up for Authorization Code, then I don't know what the return URI is.

Any help as I'm trying to automate an office building.

Thanks

Kevin Crots Facilities and Operations Manager

kevincrots commented 2 years ago

@Nickolaim Wasn't sure if you got notified of this note originally.

Nickolaim commented 2 years ago

@kevincrots - sorry for the late reply, I did not have access to a computer for a while.

The error is clear - the code failed to get token (error 400 Bad Request) and therefore get sensor values.

This project was written/tested for AirThings API for Consumers. AirThings has also API for Business, that's a little bit different - I see in the documentation that they require different scope during auth.

Please let me know are you using consumer or business versions of AirThings.