YukiGasai / obsidian-google-tasks

Add Google Tasks inside Obsidian
GNU General Public License v3.0
135 stars 9 forks source link

Successfull login but no tasks shown... #5

Closed ccjcan closed 2 years ago

ccjcan commented 2 years ago

Open the side bar, commands are available via Cmd+P but no tasks shown. Does the plugin expects a specific name for Google Tasks List?

YukiGasai commented 2 years ago

The plugin should list all tasks from every list when using the List Google Tasks command Are you logged into the right google account? Are there any errors in the dev console?

ccjcan commented 2 years ago

Hi here's what I see in the console: GET https://tasks.googleapis.com/tasks/v1/users/@me/lists?key=https://oauth2.googleapis.com/token 400 VM252:27016 GET https://tasks.googleapis.com/tasks/v1/users/@me/lists?key=https://oauth2.googleapis.com/token 400 VM252:27068 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'length') at eval (eval at (app.js:1:1494667), :27068:35) at Generator.next () at fulfilled (eval at (app.js:1:1494667), :53:24)

YukiGasai commented 2 years ago

There seems to be a problem with the API token, the part after the ?key= in the URL should contain the API Token from Google. Please make sure there are no spaces in settings input.

I'm trying to reproduce your error using my working token, but it could take some time.

ccjcan commented 2 years ago

I'm extracting my token from the .json downloaded from Google (client_secret ... dot json..) it looks like this : https://oauth2.googleapis.com/token Is this the wrong parameter? the .json file includes: client_id, project_id, token_uri (the one I'm using for the token parameter in your plugin), auth_provider_x509_cert_url, client_secret, redirect_uris

Let me know and thanks.

On Wed, Apr 27, 2022 at 1:58 PM YukiGasai @.***> wrote:

There seems to be a problem with the API token, the part after the ?key= in the URL should contain the API Token from Google. Please make sure there are no spaces in settings input.

I'm trying to reproduce your error using my working token, but it could take some time.

— Reply to this email directly, view it on GitHub https://github.com/YukiGasai/obsidian-google-tasks/issues/5#issuecomment-1111315215, or unsubscribe https://github.com/notifications/unsubscribe-auth/AR5Q6WYSJW2VORYGWZW74EDVHF55TANCNFSM5UIVS46A . You are receiving this because you authored the thread.Message ID: @.***>

YukiGasai commented 2 years ago

The token is a random combination of numbers and letters, you can find it inside the API console grafik just press "Schlüssel Anzeigen" Press Key on the right

ccjcan commented 2 years ago

Problem solved. I had to do go Credentials and then API Keys... this gave me the key (token i guess) I entered in your plugin and it worked.