Code Monkey home page Code Monkey logo

Comments (5)

toniov avatar toniov commented on June 11, 2024

Hi!

You can not pass directly the credentials path as argument, you need to pass a config file that contains your desired path for the credentials.

In your case it would be something like this (explained here ):

Create /somepath/config.json with this content:

{
  "CRED_PATH": "/Users/ts/client_secret.json"
}

Then execute the command:
$ gcal -C /somepath/config.json generateUrl

from gcal-cli.

Mumin avatar Mumin commented on June 11, 2024

thanks. Tested as you suggest but still not working and error message is not really self explaining ;-)

(ts)-(jobs:0)-(~/gcal)
(! 631)-> gcal -C /Users/ts/gcal/config.json generateUrl
[ERROR] Cannot match against 'undefined' or 'null'.

(ts)-(jobs:0)-(~/gcal)
(! 632)-> ls
client_secret.json config.json

(ts)-(jobs:0)-(~/gcal)
(! 633)-> cat config.json
{
"CRED_PATH": "/Users/ts/gcal/client_secret.json"
}

from gcal-cli.

toniov avatar toniov commented on June 11, 2024

If you include the option --debug at the end we can get the error stack.

How is the format of your client_secret.json file? It expects something in this format:

{
  "installed": {
    "client_id": "foo",
    "client_secret": "bar",
    "redirect_uris": [
      "urn:baz",
      "http://localhost"
    ]
  }
}

from gcal-cli.

Mumin avatar Mumin commented on June 11, 2024

here is my content (download right away from Google "download json" option). secret parts have been replaced by ...
{
"web:{"client_id":"....apps.googleusercontent.com","project_id":"...","auth_uri":"https://accounts.google.com/o/oauth2/auth","token_uri":"https://accounts.google.com/o/oauth2/token","auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","client_secret":"..."}
}

from gcal-cli.

toniov avatar toniov commented on June 11, 2024

I see, when you create your client ID you must choose Other in Application type, not Web.

I'll fix the README specifying it!

from gcal-cli.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.