background preloader

Google API

Facebook Twitter

Tutorial: Implementing Google+ API using OAuth 2.0 in PHP. Using OAuth 2.0 for Web Server Applications - Google Accounts Authentication and Authorization. The Google OAuth 2.0 endpoint supports web server applications that use languages and frameworks such as PHP, Java, Python, Ruby, and ASP.NET.

Using OAuth 2.0 for Web Server Applications - Google Accounts Authentication and Authorization

These applications might access a Google API while the user is present at the application or after the user has left the application. This flow requires that the application can keep a secret. Using OAuth 2.0 for Server to Server Applications - Google Accounts Authentication and Authorization. The Google OAuth 2.0 endpoint supports server-to-server interactions such as those between a web application and Google Cloud Storage.

Using OAuth 2.0 for Server to Server Applications - Google Accounts Authentication and Authorization

For this scenario you need a service account , which is an account that belongs to your application instead of to an individual end user. For example, if you use the Google Prediction API to act on behalf of your application without accessing any user data, your application uses its service-account credentials to prove its own identity, and no end user is involved.

This document describes the protocol and token format used by the server-to-server OAuth 2.0 flow. Very few readers need the instructions in this document, because: In some cases, a service account is automatically set up for you, for example if you use Google App Engine. Client libraries When at all possible, do not write the logic for creating and signing JWTs. Contents Overview. [HowTo] Google Calendar API : PHP (Part 1) at SANIsoft. Google Calendar is another indispensable tool from mighty Google. As with other Google tools, Calendar too have an API which lets users to manage the events remotely from within their web applications. Google Calendar API request/response works in the form of Google Data API feeds. The popular PHP client library used to work with Calendar service is Zend’s GData which is also distributed as a part of Zend Framework. In this tutorial we will see how to install GData, authenticate against calendar servers and then access Calendar API to retrieve a list of calendars.

Install GData First download the latest release GData library from here. Next step is to make sure you can include ZendGdata/library in your php script. Permanently set the include_path directive in your php.ini configuration file from the command lineSet the include_path path variable on a “per directory” level using .htaccessUse the set_include_path() function to dynamically set the include path in your scripts Authentication.

Calendar API v1 Developer's Guide: PHP - Google Apps Platform. This API is a subject to the Deprecation Policy and will be deprecated on November 17, 2014.

Calendar API v1 Developer's Guide: PHP - Google Apps Platform

Calendars: insert - Google Calendar API. How do I connect to the Google Calendar API without the oAuth authentication. Part 2: OAuth2 and Configuring Your ‘Application’ With Google » CornEmpire Software. This is the second part of a three part series on how to embed a Google Calendar into a web page and use it to accept online bookings/appointments from other online users.

Part 2: OAuth2 and Configuring Your ‘Application’ With Google » CornEmpire Software

The Series: Background This was by far the hardest part of the whole exercise. I had worked with version 1 of the Google API for PHP a few years back. This allowed you to code your username and password into your script, and it would handle authentication for your application. I downloaded code samples, and went about building my application, however, I quickly realized that the OAuth2 code samples are designed to allow you to interact with a visitors calendar. After a lot of trial and error, and then reading, I realized that it could be done, and relied on what is called a ‘Refresh Token’ in OAuth2.

Google Affiliate Network API PHP Script. I was excited when I read Google had released an API for their Affiliate Network, as I wanted to automate pulling sales data from GAN.

Google Affiliate Network API PHP Script

But I quickly became disheartened when I realized how difficult it is to use. Since this was for myself, and not a web-based service that would be used by others, the Simple API method of authorization was good enough. After getting it to work with Picasa, but not GAN, I asked for some help and was introduced to the OAuth 2.0 Playground. This showed me the headers I’d need to send, and how OAuth 2.0 works. For the record: the Google Affiliate Network API does NOT support Simple API Access. I now have a working script, and have written up step-by-step instructions on how you can pull orders from GAN automatically each day. This script is not complete, as it’s up to you to do something with the data once you have it.

Using OAuth 2.0 for Web Server Applications - Google Accounts Authentication and Authorization. The Google OAuth 2.0 endpoint supports web server applications that use languages and frameworks such as PHP, Java, Python, Ruby, and ASP.NET.

Using OAuth 2.0 for Web Server Applications - Google Accounts Authentication and Authorization

These applications might access a Google API while the user is present at the application or after the user has left the application. This flow requires that the application can keep a secret. This document describes how to use OAuth 2.0 when accessing a Google API from a web server application. Contents Overview The authorization sequence begins when your application redirects a browser to a Google URL; the URL includes query parameters that indicate the type of access being requested.

After receiving the authorization code, your application can exchange the code (along with a client ID and client secret) for an access token and, in some cases, a refresh token.