Questions tagged [google-api-ruby-client]

The Google API Ruby Client makes it trivial to discover and access Google APIs.

Status: This library is currently alpha and under active development.

google-api-ruby-client is a client library for accessing Google Cloud Platform services that significantly reduces the boilerplate code you have to write. The library provides high-level API abstractions so they're easier to understand.

google-api-ruby-client is configured to access Google Cloud Platform services and authorize (OAuth 2.0) automatically on your behalf provided proper environment setup. Better yet, if you are running on a Google Compute Engine instance, no additional setup is needed!

More information

222 questions
3
votes
1 answer

How does CloudKMS encryption/decryption work securely when being called from a non-Google system?

I need to know that the plaintext/ciphertext being sent to Google CloudKMS, and the public/private key used to authenticate, are secure in transit, but I don't know how to prove that. As per KMS docs, I created a service account, downloaded the JSON…
3
votes
1 answer

Correct scope for Google App Script Execution API?

I'm hoping to automate some HR work by running a Google App Script via the Execution API. Without getting too much into the details, I'd like to pass employee evaluation data as a parameter into the App Script. The script will then use this data to…
3
votes
0 answers

Google APi ruby client

I have a method to create folder on Google drive as soon a create method is hit. I want the folder to created once the batch is saved. Below is the code Im using. In the below method page redirects as soon as it is authorised. So requesting for…
3
votes
1 answer

Get basic profile info from google-api-client

I'm using the ruby google-api-client gem. I'm able to successfully OAuth and get back a access token. For the life of me, now that I have the token, I can't figure out how to get the basic profile info for the user. My scope includes…
hummmingbear
  • 2,294
  • 5
  • 25
  • 42
3
votes
1 answer

Setting up oAuth with the Google AdWords API

I am attempting to get get a Ruby on Rails project that uses the Google AdWords API. What I did so far, following the steps in this guide: I created an AdWords Manager account. I created a test account that is part of the AdWords Manager account. I…
Qqwy
  • 5,214
  • 5
  • 42
  • 83
3
votes
1 answer

Update user photo in G Suite

I am trying to update the user photo for a G Suite user using the following code: require 'google/apis/admin_directory_v1' require 'googleauth' require 'googleauth/stores/file_token_store' require 'fileutils' OOB_URI =…
Morfinismo
  • 4,985
  • 4
  • 19
  • 36
3
votes
0 answers

Retrieve a list of all Google Plus Contacts that have an application installed

I have a big problem with retrieving a list of Google Plus Contact that have installed my application. I tried to use this gem, that is recommended in Google Places API Documentation, but it was a fail :(. I tried this: require…
kitz
  • 879
  • 2
  • 9
  • 24
3
votes
4 answers

How to send params to a method?

I am trying to make a query to Webmaster Tool api using the Ruby Client. params = { start_date: "2015-01-14", end_date: "2015-01-14" } AuthWebmastersService.query_search_analytics("http://www.ex.com/", params) When I'm trying to make that…
RockNinja
  • 2,179
  • 4
  • 16
  • 16
3
votes
2 answers

Google Ruby API Client redirect_uri_mismatch error

I'm trying to use Google's API to sign up and log in users to my rails webapp. I've been playing around with the authentication, but I'm getting stuck on this error after I get the authorization code. Here's what I'm trying to do: path =…
Dennis
  • 998
  • 7
  • 19
3
votes
1 answer

How to download file from google drive api with service account?

Hello google hackers! I am using Drive Service app and uploaded file successfully like this: require 'googleauth' require 'google/apis/drive_v2' Drive = Google::Apis::DriveV2 upload_source = "/User/my_user_name/hacking.txt" drive =…
rs41
  • 319
  • 1
  • 15
3
votes
0 answers

Rspec google-api-client

I am having difficulty creating tests to mock the google-api-client gem. Below is the method I am trying to test. This method is expected to return all google calendars for a authenticated user. def all_google_calendars #create a google api…
TheFlyingV
  • 31
  • 3
3
votes
1 answer

Creating a Gmail Draft with Recipients through Gmail API

I have been trying to figure out how to automatically add recipients to a Draft email that is created using the Gmail API through their Ruby library. I can create the draft without any issues but setting the recipients is causing me troubles and I…
Kevin
  • 301
  • 2
  • 13
3
votes
0 answers

Directions API with google-api-ruby-client

I have a problem with the google-api-ruby-client as I can't find the proper way to discover the Directions API. Here is the client: @client = ::Google::APIClient.new :application_name => Rails.application.secrets.app_name @client.key =…
muichkine
  • 2,890
  • 2
  • 26
  • 36
3
votes
0 answers

The correct way of initialising Google api client on rails

I have started with this example, I managed to make everything work on sinatra. But I want to use this in my Rails app so I did the followings: Create the client, in sinatra they do that in the configure block. In rails I did: In the…
RockNinja
  • 2,179
  • 4
  • 16
  • 16
3
votes
3 answers

Google Service Account authorize() returns invalid_grant error

I've carefully reviewed Steve Bazyl's presentation at https://www.youtube.com/watch?v=iK14bfd6qhs and relevant API docs on google. I'm using the Service Account email id for my gmail account, and am using the private key downloaded from the…
stu2
  • 67
  • 1
  • 8
1 2
3
14 15