---
title: "Discussion on \"Connecting Google Cal API and Django\" | Hashnode"
description: "Discussion on \"Connecting Google Cal API and Django\". A Step by Step to Syncing a GCP Service Account to a Heroku-deployed Python App"
url: "https://hashnode.com/posts/connecting-google-cal-api-and-django/60d3b1ccf16d577cbe60cde5"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Connecting Google Cal API and Django](https://blog.benhammondmusic.tech/connecting-google-cal-api-and-django?utm_source=hashnode&utm_medium=feed)

A Step by Step to Syncing a GCP Service Account to a Heroku-deployed Python App

Jun 23, 2021 · 9 min read · blog.benhammondmusic.tech  
Updated Nov 23, 2022  
Read the article

-   [#django](https://hashnode.com/tag/django)
-   [#google-cloud](https://hashnode.com/tag/google-cloud)
-   [#apis](https://hashnode.com/tag/apis)
-   [#heroku](https://hashnode.com/tag/heroku)
-   [#python](https://hashnode.com/tag/python)

## Written by

[Ben Hammond](https://hashnode.com/@benhammondmusic)

@benhammondmusic · Denver, CO

  
[View profile](https://hashnode.com/@benhammondmusic)

Denver Dev && Song Builder

Denver Dev &amp;&amp; Song Builder

## Responses 3

Markdown supported · ⌘↵ to post

[Sabyasachi Rakshit](https://hashnode.com/@sabyasachi121)

[Dec 3, 2022](https://hashnode.com/posts/connecting-google-cal-api-and-django/60d3b1ccf16d577cbe60cde5/comment/638b407664b7288d8d8e3f0b)

Hello, I did all the steps up to the heroku deployment. When I test the google calendar api by going to the demo page, it shows service error 503. Please kindly tell me what to do.

[Harsh Upadhyay](https://hashnode.com/@harssh)

[Jul 1, 2022](https://hashnode.com/posts/connecting-google-cal-api-and-django/60d3b1ccf16d577cbe60cde5/comment/62bf88d9e4246414d3d3216f)

I facing an error running the server, it's shows decouple module not found. I have tried everything, installed the library also many times but still problem hasn't solved

[Ben Hammond](https://hashnode.com/@benhammondmusic)

[Jul 2, 2022](https://hashnode.com/posts/connecting-google-cal-api-and-django/60d3b1ccf16d577cbe60cde5/comment/62bf88d9e4246414d3d3216f#reply-62c05e25e4246414d3d33de9)

Sorry to hear that; I have no idea on that issue.

[Johanna E](https://hashnode.com/@jae1)

[Jan 15, 2022](https://hashnode.com/posts/connecting-google-cal-api-and-django/60d3b1ccf16d577cbe60cde5/comment/61e332ce8a425719c173372f)

Hi Ben!

Thanks a lot for the tutorial series - it has been extremely helpful to me so far!

One question: In the final step of deploying to Heroku I am running into an error

json.decoder.JSONDecodeError: Expecting value: line 2 column 1 (char 1) 2022-01-15T20:34:48.228327+00:00 app\[web.1\]: 10.1.58.161 - -

It seems to be connected to the way that the credentials are fed into the app and the 'SERVICE\_ACCOUNT\_FILE' variable. I am quite a newbie to Django and maybe I just did a very stupid mistake. Anyhow, any help or hint would be highly appreciated :)

And thanks once more for making all this publicly available!

[Ben Hammond](https://hashnode.com/@benhammondmusic)

[Jan 16, 2022](https://hashnode.com/posts/connecting-google-cal-api-and-django/60d3b1ccf16d577cbe60cde5/comment/61e332ce8a425719c173372f#reply-61e39a4b8a425719c1733bc1)

Hi, thanks for reading and for leaving a comment! Short answer: I have no idea what’s causing that error 🧐

Long answer: can you tell where in the process the error is happening? After quickly reading thru this SO post: [stackoverflow.com/questions/16573332/jsondecodeer…](https://stackoverflow.com/questions/16573332/jsondecodeerror-expecting-value-line-1-column-1-char-0) if looks like the main causes of that error are either reading an empty json file or trying to read a server non-success HTTP response as a json.

A lot could have changed since I wrote this post 6 months ago in terms of the api, buildpack, etc. first I’d confirm you recheck each step in this tutorial, specially copying that json blob into the Heroku secrets. If everything looks good and you didn’t miss a character copy pasting or add an extra quotation mark somewhere etc, I’d try enabling the verbose error logging I mention in the last paragraph to see if heroku’s pipeline can give you any more error specifics about what exactly was trying to read and parse a json that was missing (was it something in Django like the fetch call? Was it something in the build pack trying to making the json credentials file?)

If you have a public repo add the link here and i can take a look. Is it working for you locally but just not deploying?

[Johanna E](https://hashnode.com/@jae1)

[Jan 17, 2022](https://hashnode.com/posts/connecting-google-cal-api-and-django/60d3b1ccf16d577cbe60cde5/comment/61e332ce8a425719c173372f#reply-61e5b4b200c806252387c3b6)

[Ben Hammond](https://hashnode.com/@benhammondmusic)

Hi Ben! Thanks for the fast answer. Getting rid of the DISABLE\_COLLECTSTATIC=1 seemed to do the trick. At least its working now! Thanks a lot anyhow! :)
