How to update Google Shared Contacts (External contacts) - google-admin-sdk

I'm new to working with Google APIs, and I'm finding a lot of documentation that is out-of-date, and no longer seems to match the current G-Suite Admin portal.
Specifically, I need to work with the Shared Contacts API, as I need to be able to add and remove external contacts to our global directory (global address list). Much of the documentation I'm reading points to the "Shared Contacts API", but I cannot find that in the API Directory (even when logged in as the domain administrator in G-Suite).
Is this now handled by a newer API?
Can someone please point me in the right direction for getting started with this? The more detailed the better, including setting up API access (credentials), etc.
The goal is to have a program (Python for now, eventually replaced by Node.JS) that can be used internally by our staff to add/remove external contacts to our G-Suite contact directory.
Thanks very much,
Bill

Here is a Developer's Guide to help you started.
The Shared Contacts API allows client applications to retrieve and
update external contacts that are shared to all users in a Google Apps
domain. Shared contacts are visible to all users of an Apps domain and
all Google services have access to the contact list. To retrieve and
update Google Apps domain users contact information, use the
Directory API instead.
Your client application can use the Shared Contacts API to create new
shared contacts, edit or delete existing shared contacts, and query
for shared contacts that match particular criteria.
In addition to providing some background on the capabilities of the
Shared Contacts API, this document provides examples of how to
manipulate contacts using XML and HTTP. After reading this document,
you may wish to learn more about interacting with the API using our
client libraries by reading the programming-language specific
sections of this developer's guide.
From there, you will be able to understand how it works, since all the details was given, from set-up up to development.
Expectation from the reader/audience of this documentation:
This document is intended for programmers who want to write client
applications that can manipulate Google's contact lists using HTTP and
XML.
This document assumes that you understand the general ideas behind
the Google Data APIs protocol.
If you're using a UNIX system and you want to try the examples in this
document without writing any code, you may find the UNIX command-line
utilities curl or wget useful, as well as detailed
instructions on using cURL with Google Data services.

Related

Creating API's with 3rd party company

We are looking to use Google API's to connect to a 3rd party platform and capture such data including email address, certain customer specific content to include in the email, the subject line, and we need a "tag" to notify google to send the email. We have a business G-suite account. How can we set up these API's?
To achieve this you would simply need to set up your Google Developer's console here for the Google API's you want to use, following the steps indicated in the specific API documentation.
Here you can find a list of Google API's with the links to their corresponding documentation where you will find more information about each including setup guides or samples.
For example, this is the Google's Gmail API where you can find a reference to achieve what you are aiming for.

How to retrieve data from cloud using rest service

Our employee salary data are stored in the cloud provided by the third party. Currently, the third party need to send us a copy of the database to us and we recover it to our local server for reporting purpose. I need to build a application to retrieve the data directly from the cloud and use the only tables we need for report purpose. the third party provide restful service to do this, but since I am new to web service programming, I am kind of lost here to decide what to do. So my question is what is the best way that i could proceed this.
Any help will be appreciated.
The first place to start is to familiarize yourself with a coding language you'd like to use. You can usually find documentation from the REST API provider on the 'developer' section of their website. Once on their site, you can usually setup a developer sandbox account and grab a few quick examples from the documentation in the most popular languages i.e Java, PHP etc. Then, using the documentation, tweak the example to get the data you want for your app.
It is common for REST APIs to assign you a key/token that you will use with each request. Refer to their documentation for more examples.

Collection of information on all youtube videos

I am a first year C.S student...so please bear with me. I want to create a website which hosts all information about Youtube videos, like the number of views, likes, dislikes so that I can do some analytics on it. So how do I go about getting that information?
You can use the YouTube Analytics API's to obtain reporting metrics about YouTube Channels and Videos. Specific information on the metrics and reports available:
https://developers.google.com/youtube/analytics/v1/channel_reports
https://developers.google.com/youtube/analytics/v1/dimsmets/dims
https://developers.google.com/youtube/analytics/v1/dimsmets/mets
To access the API's you will need to use OAuth 2.0 and register with Google API's. Create or use an existing Google Account and navigate to the Google API's Console. Here you can manage the different API's you have access to.
You didn't mention what language you're using, but Google publishes libraries to help you build your application that take care of a lot of the low level implementation details. You can find the client libraries for Google API's here. YouTube client library can be found here.
In short, you will need to do some research. Google has excellent documentation and I hope the links provided can get you started. I recommend reading through the links and building a quick POC to get familiar with how the API's work before designing your system.
Good luck!

What is the purpose of a web API

I'm working on an app and websites. They have related information such as users, contracts, etc. What is the reason for designing an API and not connecting directly to the database?
Edit:
I'm just starting development and have no experience with web services. Please be as thorough as possible.
Sites such as Facebook, Google, and Twitter could never let third party apps connect directly to their database: it's an enormous security risk. (Would you be comfortable if Facebook allowed anyone to access their database, including private user information and messages?)
APIs serve as a gate through which third party apps can get the kinds of information they are permitted to access.
There are several reasons why you would use an API instead of using direct access.
The first 2 that come to mind:
Using an API allows you to write the client code without knowing any details of the specific implementation, so if you change your database structure or location for instance, you need only rewrite the API wrapper code, not everywhere its referenced.
It allows you to have different levels of authentication. As mentioned in another answer, it is not ideal for all users of an application to have access to every other users data.

Amazon products API - Looking for basic overview and information

After using the ebay API recently, I was expecting it to be as simple to request info from Amazon, but it seems not...
There does not seem to be a good webpage which explains the basics. For starters, what is the service called? The old name has been dropped I think, and the acronym AWS used everywhere (but isn't that an umbrella term which includes their cloud computing and 20 other services too?).
There is a lack of clear information about the new 'signature' process. Gathering together snippets of detail from various pages I've stumbled upon, it seems that prior to August 2009 you just needed a developer account with Amazon to make requests and get XML back. Now you have to use some fancy encryption process to create an extra number in your querystring. Does this mean Amazon data is completely out of reach for the programmer who just wants a quick and simple solution?
There seems to be a tiny bit of information on RSS feeds, and you can get a feed of items that have been 'tagged' easily, but I can't tell if there is a way to search for titles using RSS too. Some websites seem to suggest this, but I think they are out of date now?
If anyone can give a short summary to the current state of play I'd be very grateful. All I want to do is go from a book title in my database, and use Classic ASP to get a set of products that match from Amazon, listing cover images and prices.
Amazon 'widgets' can display keyword search results on my pages, but I have less control over these, and they are shown to the user only - my code can't look inside them.
Your post contains several questions, so I'll try to answer them one at a time:
The API you're interested in is the Product Advertising API (PA). It allows you programmatic access to search and retrieve product information from Amazon's catalog. If you're having trouble finding information on the API, that's because the web service has undergone two name changes in recent history: it was also known as ECS and AAWS.
The signature process you're referring to is the same HMAC signature that all of the other AWS services use for authentication. All that's required to sign your requests to the Product Advertising API is a function to compute a SHA-1 hash and and AWS developer key. For more information, see the section of the developer documentation on signing requests.
As far as I know, there is no support for retrieving RSS feeds of products or tags through PA. If anyone has information suggesting otherwise, please correct me.
Either the REST or SOAP APIs should make your use case very straight forward. Amazon provides a fairly basic "getting started" guide available here. As well, you can view the complete API developer documentation here.
Although the documentation is a little hard to find (likely due to all the name changes), the PA API is very well documented and rather elegant. With a modicum of elbow grease and some previous experience in calling out to web services, you shouldn't have any trouble getting the information you need from the API.
I agree that Amazon appears to be intentionally obfuscating even how to find the API documentation, as well as use it. I'm just speculating though.
Renaming the services from "ECS" to "Product Advertising API" was probably also not the best move, it essentially invalidated all that Google mojo they had built up over time.
It took me quite a while to 'discover' this updated link for the Product Advertising API. I don't remember being able to easily discover it through the typical 'Developer' link on the Amazon webpage. This documentation appears to valid and what I've worked from recently.
The change to authentication procedures also seems to add further complexity, but I'm sure they have a reason for it.
I use SOAP via C# to communicate with Amazon Product API.
With the REST API you have to encrypt
the whole URL in a fairly specific
way. The params have to be sorted,
etc. There is just more to do. With
the SOAP API, you just encrypt the
operation+timestamp, and thats it.
Adam O'Neil's post here, How to get album, dvd, and blueray cover art from Amazon, walks through the SOAP with C# method. Its not the original sample I pulled down, and contrary to his comment, it was not an official Amazon sample I stumbled on, though the code looks identical. However, Adam does a good job at presenting all the necessary steps. I wish I could credit the original author.
I wrote a blog post on this subject, after spending hours wading through Amazon's obscure documentation. Maybe useful as another view on the process.
I found a good alternative for requesting amazon product information here: http://api-doc.axesso.de/
Its an free rest api which return alle relevant information related to the requested product.
Some links i found:
Forum thread for amazon tutorial request
Amazon Web Services
Some sort of script for using the amazon eCommerce API
another tutorial for amazon web-store-y stuff
Amazon and ebay e-commerce API tutorials
Straight from the horse's moutyh: Summary of Product Advertising API Operations which has the following categories:
Find Items
Find Out More About Specific Items
Shopping Cart
Customer Content
Seller Information
Other Operations
Since the time when the question was asked in 2009 the changes have, unsurprisingly, continued and some of the answers and links provided are now superseded or deadlinks.
As of February 2022, Amazon now provide the Product Advertising API Scratchpad for developers to try out API requests so they can get up and running in minutes:
Scratchpad is a tool to help Amazon Associates send basic requests to
the Product Advertising API. Follow the steps below and you can have a
working request with sample code in minutes.
The linked page also has onward links to pages where you may
sign up for the Associate program and Product Advertising API and access the complete API documentation.
As mentioned by #Reg Edit in his recent answer, Amazon now provides a scratchpad for their Product Advertising API, which in-fact does have a "SearchItems" endpoint which presumably returns products for a search query similar to the one a shopper would enter into Amazon's search bar while shopping.
Here's a link explaining on how to get access to Amazon's Product Advertising API. This would be helpful for anyone looking to display Amazon product's on their application programmatically.
In order to get access to Amazon's Product Advertising API, you must meet the following 3 requirements:
Have completed 3 sales in the last 180 days
Have an approved associates account
Comply with this agreement
Now if you don't meet the above requirements, the only other option Amazon gives you is to use their SiteStripe widget, which is a tool to help associates build links manually.
If you do not meet the requirements listed above and would still like to get Amazon product data for your app or website programmatically, you may use web scraping to achieve the same. Since the data is public, no one can legally stop you from scraping it. Depending on how experienced you are with programming, you could either build a scraper yourself or use a service that enables you to do so.
I have built one such service myself—it is called Amazon Product Search API and it allows users to grab search results from Amazon including product title, thumbnail, URL, etc. for any search query a user would make while shopping on Amazon. It supports all the major countries Amazon operates in.
Using this service does not require you to be an Amazon associate. Users may scrape up to 10k search results for free.