Can you submit a Restful request to a google forms api? - google-forms

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

Related

Is there a method to extract individual google form responses?

I do not own the form and I don't have any permissions. However, is there a method such as using google app scripts to extract individual responses from google forms? I only have the link and the ability to view analytics

Google Analytics Embed API authentication

I'm looking at getting some stats out of Google Analytics using the Embed API to display on our site using javascript.
My question is:
Is it possible to display the stats without the user authenticating? I.e. I would like to make some traffic statistics available to anonymous users.
Thanks,
Chris.
This is definitely possible, but you'll have to get the access token yourself (server side, using whatever OAuth 2.0 flow you want).
Once you have a valid access token, you can pass it to the gapi.analytics.auth component and use the Embed API as normal.
Here's some documentation on that:
https://developers.google.com/analytics/devguides/reporting/embed/v1/component-reference#auth
UPDATE: (07/27/2015)
A demo of server-side authorization with the Embed API is now featured on the Google Analytics Demos & Tools site. You should look there to see a working example.

How can I create a tracking JavaScript code like google analytics based on Javascript?

all I am trying to create Google Analytic clone. I know how to get information about the browser location IP and other similar things in PHP
What I want to know is how to create a java-script which sends this information from any website where my code is placed on my server ???
What is the minimum security requirement to create a tracking JavaScript code like google analytics?
redirect users to different pages based on session data in PHP?
Or in other words, do I have to send an ajax request to my server?
Is there any available solution already available subject to java-script?
Most analytics tools generate a url with query string parameters attached to it and then output a 1x1 image pixel, with the img src as the url. Your server would then receive and store the data. The only thing returned is the actual 1x1 pixel. This is the common method because in the event a site does not have js enabled, you wrap a hardcoded img to your server in noscript tags and still get basic info like page view.
But is there a reason why you are wanting to build your own analytics script instead of use an existing one? There are a number of 3rd party ones available, including free ones. Alternatively there is Piwik, which is a free and open source solution if you want to build off it and not have to start from scratch.

Youtube video upload using asp.net

I want to upload video to Youtube from my ASP.NET application. It should return video ID or embed code after uploaded video.
Ah, google integration. Be ye warned: here lies madness.
http://code.google.com/apis/youtube/2.0/developers_guide_protocol.html#Process_Flows_for_Uploading_Videos
An extremely high overview:
You will either
Need to perform integration with oauth to retrieve an authorization token, or
Pass this user along to google to authorize them and then send you back a token which you must catch.
After authorization you may either:
Send youtube an http post request containing the video upload as well as meta data, or
Submit a form post that contains the a hidden input feild with their auth token.
Youtube then passes you back data that contains the id as well as other meta video data.
At this point you would need to perform additional http posts to their api in order to retrieve the embed code.
Youtube's api upload documentation lists between 6-13 steps depending on what choices you make in your app.
Hope this overview helps!
Edit
Here is another question on SO about this same thing. It includes code samples:
How can I upload a video to YouYube using the Youtube API in C#?

Send Facebook message from application

How can I send a message to the currently logged in user from inside a Flex application contained in a Facebook iFrame and using the official AS3 Library for Facebook please?
To date the Graph API is the easiest way to work with facebook.
http://code.google.com/p/fbas/
It's far from a complete implementation, but Graph is so simple it shouldn't take long to implement any features you need.
NOTE: When I've used it I ported the javascript portion of the example code on the project's main page to AS3 & ExternalInterface. It reduced external dependencies to zero (with the exception of swfobject)
Facebook does not allow you to send messages . Either way , you can post to the user's friends feed on behalf of the user , with a custom message and the the notification for the post in feed will be displayed.
Post your request to http://graph.facebook.com/PROFILE_ID/feed
Requires the publish_stream permission.
You can refer this link http://facebooksdk.blogspot.com/2011/04/facebook-album.html

Resources