Enable access for a GAE application to a Google API using the google-api-python-client library

Currently, I am in the process of developing a Google App Engine application where users can fill out an online form. Depending on how the form is filled out, a calendar event is created in a specific Google Calendar. My concern lies with the authorization aspect of this project - I want the form to be completely accessible to the public without requiring any sort of login to create the calendar event.

I have managed to successfully implement the form and post creation using OAuth2, but only when I am signed in.

Here's what I have set up:

  • An app registered as form-app(.appspot.com)
  • A Google account identified as form-app-admin(@gmail.com) which owns the Google Calendar receiving the posts
  • An API Project managed by form-app-admin

I have utilized these components along with the google-api-python-client library (including its oauth2decorator), following the example provided for Google App Engine. When logged in as form-app-admin and visiting form-app.appspot.com, everything functions as intended. However, if not signed in as form-app-admin, the functionality breaks down.

My goal is to grant the permission to write events to form-app-admin's primary calendar directly to the application itself, rather than relying on the user currently interacting with the app. Is there a better approach to achieving this? The key requirement is that anyone, whether logged into Gmail or not, should be able to complete the form and generate a calendar event.

If anyone has the necessary Python code to make this work, I would greatly appreciate it. But more importantly, I am seeking guidance on how to navigate this issue, given my limited experience with authentication-related tasks.

Thank you for your time! /Tottish

Answer №1

If you're looking to assert identity to Google APIs, the App Identity API is what you need. It provides examples on how to utilize the API for this purpose.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Django is unable to fetch a .docx file using Ajax requests

The issue I am experiencing involves a script that directs to the badownload function in order to download a .docx file. However, the result of this function is a downloaded .docx file that does not work as expected. Below is the script: <script> ...

Launching a Shinyapp through the use of Python onto the Shinyapps.io

Having trouble deploying a shiny app with Python on Shinyapps.io. When attempting to deploy, I encountered the following: rsconnect deploy shiny first_python_app --name myaccount --title first_python_app_test The deployment process showed: Validating serv ...

What steps can be taken to resolve the ERROR Executor - Exception in task 0.0 in stage 20.0 (TID 20) issue?

Although a similar question has been briefly answered before, I couldn't add my additional query due to lack of minimum reputation. Hence, I am posting it here. I am trying to process Twitter data using Apache Spark + Kafka. I have created a pattern ...

Is it possible for the python responder library to function within a conda environment?

I'm attempting to utilize the responder package (https://github.com/taoufik07/responder) within a conda environment. However, I am encountering the following issue: conda create --name tmp python=3.7 conda activate tmp conda install -c conda-forge res ...

What is the best method for defining specific kwargs for a URL outside of a loop?

I have added some links in my template. <ul> {% for cat in cats %} <li><a href="{% url 'c_index' cat.slug %}">{{ cat.name }}</a> {% endear %} </ul> <ul> {% for type in types %} < ...

What are the best practices for utilizing python-poetry on various architecture types?

When it comes to my development setup, I primarily use x86_64, but some of my deploy environments are arm7vl (Raspberry Pi). While most Python libraries aren't an issue, there are a few that are only available on either PyPI for x86_64 or piwheels for ...

Analyzing the values of various keys within a dictionary for comparison

My data structure involves dictionaries nested inside a list, represented as follows: sample_dict = [{1: [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], \ [1, 2, 3, 4, 5], \ [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]]}, \ ...

Steps for generating grouped and stacked bar charts

Dealing with a large dataset that includes multiple subsidiaries catering to three distinct customer groups across different countries can be quite challenging. Even though the provided example is simplified, the reality involves significantly more subsidi ...

What is causing my web scraping code to only retrieve 300 names?

import pandas as pd from selenium import webdriver from selenium.webdriver.common.by import By import time from selenium.webdriver.common.keys import Keys from selenium.webdriver.chrome.service import Service as ChromeService from webdriver_manager.chrome ...

Automate file uploading in a window using Selenium with Python

Having trouble uploading a photo to Instagram with send_keys() method. name_input = driver.find_element_by_name('username') name_input.send_keys(user[0]) password_input = driver.find_element_by_name('password') password_input.send_key ...

Manipulating pandas Dataframe output based on different entries within a single column

Below is a representation of my dataset, DF. DF_Old = ID NER tID POS token R 1 B-ORG 1 NNP univesity "OrgBased_In+university of washington seismology lab.*wash" 1 I-ORG 1 IN of "OrgBased_In+university of washington seismology lab.*w ...

Exploring LXML and Python: Strategies for identifying and manipulating parameters on the same parent-child level

I am currently grappling with how to tackle this particular issue, which is why I have not yet written much code on the subject. My current project involves working with lxml to handle XML files. The challenge at hand involves identifying a specific Settin ...

What is the best way to connect Stripe payment gateway with Django Oscar?

My goal is to implement the Stripe payment gateway into Django oscar for an e-commerce platform that specializes in selling products such as groceries online. I am utilizing python 3.6.3, Django 2.0, Django-oscar 1.6, and stripe 1.82.2. Method 1: I follo ...

Python: Techniques for zooming out from a webpage with selenium

In an attempt to zoom out to 25% using my Python Selenium program, I want to go from this: https://i.stack.imgur.com/6hPjF.png to this: https://i.stack.imgur.com/4LFMj.png When zoomed out to 25%, all the elements that should be visible while scrolling d ...

I am experiencing sluggish performance with my heap

Check out my min-heap code for a homework assignment: def heapify(i): global end,a l=2*i+1 if l>end: return None r=2*i+2 minarg=i if a[i]>a[l]: minarg=l if r<=end: if a[minarg]&g ...

Discrepancy in output between Tflite model on Android (ML Vision) and Python platforms

While implementing ML Vision API to generate embeddings from a FaceNet model and comparing cosine distances between the two embeddings, I have noticed significant discrepancies in the output between the Android and Python versions. Surprisingly, the Python ...

discovering the initial preceding sibling that matches, exclusive of any others

Is there a way to locate only the first preceding sibling that meets a specific criteria (e.g. class='a')? Currently, my search returns all matching nodes instead of just the first one. Here is an illustration of what I am referring to: tr class ...

Is it possible to integrate Chrome browser into a python QT GUI?

Currently, I am working on a Python GUI that leverages Selenium to open a Chrome window. I was curious if there is a way within the PyQT GUI to embed the Chrome browser's window, essentially combining them into one interface instead of having separate ...

Is it possible to execute various actions in Python unittest based on the outcome of the test?

How can I adjust my python unittest module to execute specific actions depending on the outcome of the test? My scenario involves running automated selenium webdriver tests, and I want to be able to take a screenshot in case of any failures or errors. ...

Dividing Strings Using a Combination of Dictionaries in Python

So I have successfully managed to extract data from the Google Financial API for single stock quotes, but I'm encountering issues when trying to fetch information for multiple stock quotes. The json loads function is not cooperating with multiple dict ...