myntath / gtasks-ha

GTasks custom component for HA
MIT License
18 stars 2 forks source link

Error in googleapi.py??? #6

Closed stofakiller closed 1 year ago

stofakiller commented 1 year ago

I come to the google page where to give access/accept the integration, but when i press next, it redirect me to localhost, as i can see thats in the file gtasks_api.py in line 43... So i cant get the auth to work in HA... It that just me, or is it a bug?

myntath commented 1 year ago

This is currently expected (although not ideal) behaviour. See point 9 in the instructions.

Authenticate and once you reach a 404 page not found look at the url and copy and paste the code between 'code=' and '&scope='.

stofakiller commented 1 year ago

Just saw that but i also triede that before, and get a Unknown error occurred

I'll try to delete it again, reboot and start all over :-) Thanks for your quick reply

stofakiller commented 1 year ago

Nope, after i put in my auth return code, i still get an unknown error occurred

myntath commented 1 year ago

If you've got the auth code from google then this is likely a different issue now. I would suggest trying to see if there is anything in the home assistant log.

Issue #2 may also be related and so it may be worth deleting your 'token.pickle' file and setting everything up again.

stofakiller commented 1 year ago

Found something in the logs for Gtask, you have to enable the "Google Tasks API", i had only the calendar enabled

json returned "Tasks API has not been used in project xxxxxxxxxxxx1 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/tasks.googleapis.com/overview?project=xxxxxxxxxxxxxxx then retry.

So now it works :-D

myntath commented 1 year ago

Great to hear! I'll close this and I will at some point make some detailed instructions of setting up the Google credentials.