If a google form is publicm then why can't I retrieve the data as a JSON from
https://forms.googleapis.com/v1/forms/{formID}
using the REST API ?
https://developers.google.com/forms/api/reference/rest/v1/forms/get
Related
I want to use google forms to collect questionnaire responses but with a much more custom UI for doing so. Is there a way to send in responses from my custom application to my google forms api?
You can use the endpoint to fill the google form directly.
Steps -:
Create a google sheet.
Click on the Tool menu to create a google form.
Then create some google forms fields.
Now in the right top corner click on the 3 dots and select the Pre-fields link form.
Fill the info and click on the Get link and copy the link
Now you have a URL with the endpoints like this
Endpoints are
entry.1651815625.
entry.952362665
Google Sheet Link for Form -: "https://docs.google.com/forms/d/e/1FAIpQLSfxoz5dqXC-_LoGJWZCPasww6woHcOl0s48PYcCj-72uUJoBQ/viewform?usp=pp_url&entry.1651815625=Radha&entry.952362665=Krishna"
To Convert this link to this way
"https://docs.google.com/forms/d/e/1FAIpQLSfssz5dqXC-_LoGJWZCP93ww6woHcOl0s48PYcCj-72uUJoBQ/formResponse?&submit=Submit?usp=pp_url&entry.1651815625=Radha&entry.952362665=Krishna"
Instead of "viewform" you have to write "formResponse?&submit=Submit"
Now you can pass your own value and hit this URL to submit your google form directly.
For more info, you can watch this video from The Coding Bus
https://youtu.be/PVM7h5QCnnM
If you want to update the form's layout, it is possible to update it from your application using the Google Forms API. However, the Google Forms API currently does not support sending responses to your form, as shown here
At this time the Google Forms REST API doesn't support creating form responses as the Form.responses resource only includes two methods: get and list. Ref. https://developers.google.com/forms/api/reference/rest/v1/forms.responses?hl=en
You might use the Forms Service from Google Apps Script to create Google Forms Responses programmatically. To call this service from your app you might create a web-app in order have a HTTP GET / POST request end-point or use the Google Apps Script REST API.
Another option might be to use a "hack" to emulate the Google Forms POST request. See Auto-Fill or automate a Google Form
Related
Is it possible to 'prefill' a google form using data from a google spreadsheet?
how to create a google form response with app script
Load form responses with script in sheet - Create initial forms with nothing but an ID number
I am currently facing an issue while logging specific field in API Connect analytics for SOAP Services.
There is a section in API Designer Analytics where you can define and specify existing Parameters for your API that can be used to gather analytics data about the API. For REST I have tried and I am getting specified fields in Analytics but for SOAP I am not getting.
I am using version 5.0.8.5
I'm trying to access the Google Analytics API via Google Sheets (Google Script).
So within the script, I'm trying to use the URI as described here: https://developers.google.com/analytics/devguides/reporting/realtime/v3/reference/data/realtime/get
The API call looks something like this:
GET https://www.googleapis.com/analytics/v3/data/realtime?ids=3254435&metrics=ga%3AActiveUsers&key={YOUR_API_KEY}
Within my Google Analytics Script, I've also created a Public API Access key:
However, I can't seem to get any data whether if I'm appending the token key in the URI or within the header.
Can any one point me to the right direction?
Thanks
The public api key is for public access APIs. Data that is not owned by a user. You need to create client id from web application.
Then you will be able to authenticate it using Oauth2.
this might get you started. https://developers.google.com/apps-script/advanced/analytics
How to know when you need to be authenticated:
Public API: Aanalytics metadata API meta data doesn't belong to any user its public data anyone can access.
User data API: Google Analytics Real-time Data the data returned is owned by a user, it is not public data viewable by everyone. Documentation states
Requires authorization
If the documentation says requires authentication then you have to be authenticated to access that call.
You can use Google Analytics API easily just by enabling them in App Script.
Below is the Guide to using Real-time API in Google Spreadsheet
https://www.tatvic.com/blog/google-analytics-real-time-data-in-google-sheet/
Just like above you can use any API no need to take care of tokens.
Is there a way to fetch information for multiple ids in a single GA Reporting API query? See here for reference to the tool I am using: http://ga-dev-tools.appspot.com/explorer/
Tthe Google Analtyics core Reporting API is a little confusing. Core Reporting API - Reference Guide - Ids calls the Query Parameter ids but it is in fact singular. You can only send one id at a time.
Anwser: There is no way to send more then one view (profile_id) to the Core reporting api as a single request. You will need to loop over your request and send it multiple times.
Example:
https://www.googleapis.com/analytics/v3/data/ga?ids=ga:34896749&dimensions=ga:date&metrics=ga:entrances&start-date=2014-05-12&end-date=2014-05-22&oauth_token={OauthToken}
https://www.googleapis.com/analytics/v3/data/ga?ids=ga:34896744&dimensions=ga:date&metrics=ga:entrances&start-date=2014-05-12&end-date=2014-05-22&oauth_token={OauthToken}
How to get Google analytics data in our database and after first time authorize data all data store and automatically update daily without authorization.
once I authorize in Google account and after authorize and store data in our data base and again login in site so in this time how to update all Google analytics data in our database please help me.
I wait for your reply.
You can use the core reporting api v4. Whenever you perform a request you get a response with a pageToken. The final response is the one that returns a null pageToken. This is the key criterion to get all the data you want! Keep in mind that each request requests at most 10000 rows of data! You need some credentials to get authorized for accessing google analytics. There are two ways: The first one is using a json file and the second one using the .p12 file. In bothe cases you need a view Id. For more details you can have a look at core reporting api v4 documentation! Each time you perform a request one more authentication is triggered! It is inevitable! GA api is extremely fast though!
if u want to access google analyitics data first u must use offline so we can get refresh token this referesh token store in your database if u want to again u r data without authorization u can use this refresh token and generate access token so now each and every time u can get updated google analytics data by using offline access .........