Share your code.
- Log in to a Google Account that has access to the calendars you want to display, go to the API & Service Credentials page and create a new project.
- Click the
Create credentialsbutton, select
OAuth client IDand configure a Consent Screen first (enter a product name of your choice and leave everything else blank). Then chose
Otheras the application type using any name you like.
- Download the credentials using the
Download JSONbutton and put it in a sufficiently secure location (it does contain your client secret), e.g.
- Generate the authentication URL:node dist/backend/cli auth-url --credentials ~/.gcd-auth/credentials.json
- Open the returned URL in your browser and use the generated code to create a bearer token:node dist/backend/cli get-token --credentials ~/.gcd-auth/credentials.json --code <code>
- Save that token in a separate file, e.g.
- If this is the first project of this kind you are using, you may have to enable the Calendar API.
- You should now be able to start the server using the two files created above:node dist/backend/cli serve --credentials ~/.gcd-auth/credentials.json --token ~/.gcd-auth/token.json --calendars config.json