Using Google Contacts API with titanium - titanium

I am new to titanium and am trying to make a directory of contacts using Google Contact API. I have read up on it yet aren't seeing too many helpful examples. I know I need authentication yet I can't seem to figure out where to start. Any help is appreciated.

You may know some of this already but here's the broad strokes overview for others and an answer to your question (Any help is appreciated).
You need to create an (Google) account and register your project/application first in order to make requests for non-public user data. The request must include an access token. The token also identifies your application to Google.
In order to authenticate a user/application: You will need to Use OAuth 2.0 to authorize requests. You must register your project in the Google API Console and enable the Contacts API service in order to use OAuth 2.0.
To implement the OAuth protocol in a Titanium app you can follow along with the sample/tutorial in this blog post:
OAuth Login for Titanium

Related

I can't log in to my dashboard through a shopify api

I cannot log in to shopify through an api.
I want to build a private app with a shopify api, and I just created a laravel project and connected it to shopify through an api. I am using 'ohmybrew' and wrote my api credentials in my config. I tried to log in through an api but I get an error as follows.
Oauth error invalid_request: The Shopify API application does not support oauth
I expected to go to my dashboard but it did not work. It's my first time to work with shopify, and I am baffled as to what to do. I would appreciate it if someone could tell me what I am doing wrong.
oAuth is well established. You could probably say almost all systems with a public API support oAuth. Shopify is no different from any of them, and they all follow the same pattern. So it seems your attempt to follow that pattern is incorrect. The best thing you can do then is to look up some tutorials on how to connect to an API using oAuth, with an emphasis on your scripting language so you can have some solid code examples to follow. Once you master oAuth, you'll be able to see your dashboard.

Google API Oauth2 - Server-side app, create Oauth token without user interaction or prompt

I've been having some problems trying to understand the Oauth requirements for Server-side applications which don't require User interaction when querying google API's.
Apologies if this seems obvious to most, but the issue I have is that all the examples and Oauth flows are based on prompting a user to either authorize which features the application has access to or authenticate the user with a google account before being granted a token and refresh token.
Does anyone have experience querying the Sheets API from a server side app without user interaction that could give me some pointers on how to create the Auth token?
I'll be using Javascript, AJAX and JSON to call the REST API.
Many thanks,
Billy
Thanks pinoyyid, having searched this site for and hour and playing around with Oauth playground for better part of an hour, it's frustrating to know the answer was right under my nose in the settings!
Thanks again, really appreciate you pointing me to How do I authorise an app (web or installed) without user intervention? (canonical ?).
For those reading this in the future the link in the comment above will solve your problem, to summarise, you can use your own app settings by going to the google Oauth playground and on the top right select the settings (picture of a cog/gear) and ticking the box to use your app details, enter the client ID and client secret, job done.
Cheers,
Billy

Difference between Google "OpenID Connect" and "sign-in with Google"?

I want users to my website to use Google Accounts to authenticate / sign in to my website. The primary use case being users will edit and generate content and we want to log ownership in a secure way. We are not interested in obtaining users Google data, we just want a means to authenticate users.
After googling, I came across some documentation, which seems to explain how to do this OpenID Connect (OAuth 2.0 for Login). But the documentation immediately says "Note: If you want to provide a “sign-in with Google” button for your website or app, we recommend using Google+ Sign-In, ...", which if you follow the link ultimately takes you to Google+ Sign-In.
What's the difference between these two pages of documentation? Why does the first tell you to go to the second while not saying the first is deprecated? Are both/either suitable for my use case? All it says is "we recommend" I want to know WHY, WHY do they recommend it?
UPDATE: I also found yet another link which seems to be documenting another approach https://developers.google.com/accounts/docs/OAuth2WebServer I think this is just for "Authorization" i.e. authorizing your app to make google api calls to get user data, so cannot be used for authenticating/sign-in.
BTW I'm building my website with a Scala Spray BE REST API & NG JS FE.
A comparison of the two is available here.
Google+ Sign-In with profile scope
Has Google client libraries for authenticating with OAuth 2.0, which includes support for Google+ and other Google services (like getting social information on a user). Also this can make implementing easier and requires less boiler plate code
Has the Google+ Sign-In button to simplify sign-in Has no pre-built widgets
Supports over-the-air Android installs
OAuth login is primarily just for authentication at a lower level, that is by making raw HTTP requests, no API.
OpenID Connect protocols (OAuth 2.0 login)
Google+ Sign-In supports OIDC interoperability if you configure with the openid scope and get the user profile using getOpenIdConnect.
OAuth 2.0 login supports OIDC directly. Use it for signing in users to apps that do not need social features and run on platforms not supported by Google+ Sign-In.

Use Service account with Google API like youtube, picasa in web asp.net mvc 4 / JavaScript

I come in order to have some information about Google API and particularly the authentication "Service account"
I have the same problem that this guy is having, and although that concerns another API, he explains the problem very well.
For a few days now I have already read some articles:
Google dev
DrEdit for .Net
C# sample
I have already registered for a Google API account and I am using the Client Key and Secret that was provided to me. I then downloaded the following libraries:
google-api-dotnet-client-1.2.4737-beta.source.zip
youtube-api-samples
google-youtube-v3-rev35-csharp-1.2.0-beta
Nothing has helped me so far...
I would like to know if Picasa web and the Youtube API v2 or v3 can use oAuth2.0 Service account as I am not able to find anything about that. I am currently using Picasa Web oAuthv1.0 and I found it really easy to use but I would like to migrate to Google Youtube API v3/Picasa web API.
The basic workflow idea:
Private Pictures and videos are created specifically for a web site.
Users will log into the site (it isn't a Google users) and see pictures and videos -> All users that successfully log into the site have access to all youtube videos and picasa pictures and this medias are private in Google
The only example I've found anywhere that shows how to use authentication was in a ASP.NET MVC project that unfortunately requires user interaction and i don't want that.
Can someone please me on this? Does anyone has a piece of code written in Javascript or C# for connecting to the API with Service account or is it better for now to authenticate with oAuthv1.0? Any help will be highly appreciated!!
Take a look in Which Google APIs can be accessed with service account authorization? it contains a list of all APIs which support service account.
As far as I know, Picasa and Youtube don't support service account.
Based on the article posted by peleyal, it is my intepretation that YouTube should support the service account. In the answer on the related article, it states "All Google APIs that supports OAuth 2.0 should work with Service Accounts".
Assuming YouTube is a Google API, it also should work.
I'm not 100% confident in that answer unfortunately, because I have seen documentation elsewhere that says Service Accounts: "Several Google APIs act on behalf of an application and do not access user information." https://developers.google.com/accounts/docs/OAuth2#serviceaccount
Does accessing the YouTube APIs constitute "user information"? The answer to that question is the reason I'm not 100% confident without trying it. An expensive time proposition.

client side javascript authentication with github and LinkedIn - get access token

I need to get an access token from differente providers from the client side.
The idea is that I need the user to authenticate with these providers from javascript, and then retrieve an access token to be used to authenticate against another web service...
So far now, we managed to do it on twitter using twitter-anywhere, in facebook using the javascript SDK and in google using it's api-javascript-client
I was wondering if there's a similar solution for yahoo, linked and github. Or even better, a more general solution that could handle different providers...
Surely, there is one for Linkedin.
http://developer.linkedin.com/javascript
http://developer.linkedin.com/documents/javascript-api-reference-0
Not sure if this was around when the question was asked. For github, the comment by #Ivan Zuzak would suffice.
This link has a workaround with a little server support - http://blog.vjeux.com/2012/javascript/github-oauth-login-browser-side.html