For detailed information about flows for various types of applications, see Google's OAuth 2.0 documentation. Some flows include additional steps, such as using refresh tokens to acquire new access tokens. If Google determines that your request and the token are valid, it returns the requested data.Your application requests user data, attaching the access token to the request.If the user approves, then Google gives your application a short-lived access token.Google displays an OAuth dialog to the user, asking them to authorize your application to request some of their data.
Find out more aboutįrequently asked questions about app verification in the Help Center. If you see unverifiedĪpp on the screen when testing your application, you must submit a If your public application uses scopes that permit access toĬertain user data, it must complete a verification process. When your application needs access to user data, it asks Google for a particular scope of access.(If it isn't listed in the Console, then skip this step.) Activate the Google Contacts API in the Services pane of the Google APIs Console.Google then provides information you'll need later, such as a client ID and a client secret. When you create your application, you register it with Google.The following general process applies to all application types:
The details of the authorization process, or "flow," for OAuth 2.0 vary somewhat depending on what kind of application you're writing. Requests to the Google Contacts API for non-public user data must be authorized by an authenticated user. OAuth 1.0 was officially deprecated on Apand stopped being supported on May 5, 2015. You must register your project in the Google API Console and enable the Contacts API service in order to use OAuth 2.0. The token also identifies your application to Google. When your application requests non-public user data, it must include an access token. Gd_client = (source='YOUR_APPLICATION_NAME')Īuthorizing requests to the Google Contacts API service The following import statements: import atom.data To run the examples in this document in your own code, you'll need
RequestSettings settings = new RequestSettings("YOUR_APPLICATION_NAME") ĬontactsRequest cr = new ContactsRequest(settings) Ĭontaining all the sample code shown in this document, is availableĭemonstrate the use of the Contacts Data API.
To compile the examples in this document into your own code,Īnd add the following using statements: using Google.Contacts Import .extensions.* ĬontactsService myService = new ContactsService("YOUR_APPLICATION_NAME") To compile theĮxamples in this document into your own code, you'll need theįollowing import statements: import .* The sample client performs several operations on contacts toĭemonstrate the use of the Contacts Data API. JavaĬontaining all the sample code shown in this document, isĪnd execution instructions are included in the same directory in
Information, see the manual pages for those utilities.
This document without writing any code, you may find the UNIX If you're using a UNIX system and you want to try the examples in Note: To view your contacts without using the Google Contacts API, you can log in to Gmail and click the Contacts link. The API Console, then you're all set you can visit the Google Contacts API user interface to set up, edit, or view your test data. If you already have a test account with a project registered in This section contains some information to help you get started with the Google Contacts API. For general Google Contacts API reference information, see the reference guide. This document assumes that you understand the general ideas behind the Google Data APIs protocol. These examples come in various forms, including raw XML/HTTP requests, Java.
It provides a series of examples of basic API interactions. This document is intended for programmers who want to write client applications that can interact with Google's contact lists. Your client application can use the Google Contacts API to create new contacts, edit or delete existing contacts, and query for contacts that match particular criteria Audience Contacts are stored in the user's Google Account most Google services have access to the contact list.
The Google Contacts API allows client applications to view and update a user's contacts. Which provides both contact and profile information using JSON instead of the Note: For read and write access to users' contacts, use the People API, For our official statement on the deprecation please read our service announcement. Warning: The Google Contacts API is now deprecated and is scheduled for sunset on June 15, 2021.