Servage Magazine

Information about YOUR hosting company – where we give you a clear picture of what we think and do!

Talking about Google APIs for websites

Monday, July 1st, 2013 by Servage

Our historical journey on the web is awesome; first local to global and now global to local! Yes, online businesses now concentrate on localizing their services by providing accurate local information, including use of maps from Google map services. As a web designer, if you want to integrate Google maps or use Google APIs in your project you should consider this article about the Google APIs first.

Google API is simply the most popular and powerful JavaScript libraries on the internet, used by more than 350,000 websites. It is absolutely free for moderate to low level traffic websites, resulting in a wave of map mash-ups in all kinds of websites. From a technical point of view, its simplicity has attracted a huge mass of web developers, who work with and integrate it on such large scale.

Technical Point of View

Most Google APIs implement the “REST” model, short for “Representational State Transfer.” It’s a type of software architecture for distributed systems, where you need to make only HTTP requests to get data. If you make a request, you will get results in XML or JSON format files. Now, technically you realize all such processes run behind the scenes, except in cases of authorization. These appear on the surface, only when final results are needed to display.


At this juncture, you may question what this authorization means. As we are living in an era of personalization, where every process starts with a user’s account, the user’s password protects their account from the open web. Therefore, if a web developer wishes to access the personal data of a user, she has to face the barrier of the password, first hand.

In practice, we can’t ask any user to share her password each time we wish to access the data, but we can create a mechanism that grants the permission of the user only once to access the account, and then use that permission every time a developer needs to access that personal account data. In programming terms, this kind of system can be created using the “OAuth Component.” The OAuth Component is therefore a great tool to easily access such permissions.

In the case of Google APIs, the authorization process is simple, with short steps such as:

When you make an authorization request in your application, it directly goes to the Google authorization server to obtain an authorized request token. At this point Google is asking the concerned user to grant you access for the required data in a subtle manner so user can trust you and Google both. Once user gives green signal, your application can get an authorization token. Now you can exchange this token with the access token. Once you have access token you can obtain requested data from the Google’s service access servers.

Without OAuth

As stated earlier, all REST APIs don’t need authorization using OAuth, as they can perform this task with the help of “Simple API Access” using Google Places API. Your application only needs an API key to make a HTTP request. The fundamental difference here is that such applications don’t need user’s data. Instead they deal with only Google Maps access. Therefore, they don’t need to make use of OAuth.

You may question that without using OAuth, how can an application access the Google Map data? Well, there is a mechanism called registration on Google APIs Console. Though, Google can grant access without registration on Google APIs Console, however that will lead all processes to spin out of control. And now Google is costing high traffic websites as well as inserting Ads in the user applications. Hence, Google needs some sense of control for better management and monetization.

In a later article, we will discuss more on the Google APIs.

References & more reading:

Understanding Google APIs

How to Add a Google Map to Your Web Page



Talking about Google APIs for websites, 3.5 out of 5 based on 4 ratings
Categories: Software & Webapps


You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

No comments yet (leave a comment)

You are welcome to initiate a conversation about this blog entry.

Leave a comment

You must be logged in to post a comment.