I work for a company that performs a lot of repetitive tasks by hand. Since most of these tasks are being done digitally, I have been doing some python programming in order to make my job much more efficient by automating many of these tasks. The task that I am currently trying to automate involves inputting data into a Google form over and over again. I am trying to create a program that auto-submits these forms via sending a POST request using the python requests library to the /formResponse section of the selected Google form. I have already managed to create a tool that can do this for a normal form however, I am now attempting to do the same thing, but instead using a Google form that is restricted to the organization (i.e. only users of an organization of “@xxxxx.com” can use it). After doing much research, I believe that I need to authorize the POST request before submitting it using some kind of Google token, but I am unsure how exactly to go around doing something like that. Could someone please help me with how to authorize a POST request with the needed permissions to submit a restricted Google form?
I have tried many different ways of passing authorization credentials into the headers of the POST request, but I continue to receive an HTTP code of 401 “Unauthorized”. I believe that I am doing the authorization wrong, as my account has permission to access the form, but I have no idea what the issue is. So if someone could give me a full run down on how to do it, I would be very grateful for the help.
Thank you,
SonicDJM
Derek Moczygemba is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.