Questions tagged [google-api-ruby-client]
The Google API Ruby Client makes it trivial to discover and access Google APIs.
221
questions
0
votes
1
answer
47
views
Ruby authentication to access Google sheets after OOB ban
I can't understand how to access to sheets after OOB deprecation.
Here https://github.com/googleapis/google-cloud-ruby#authentication there is no example and the sample project, Quickstart, https://...
0
votes
0
answers
27
views
Rails Google Analytics filter not equal
I am looking to add filters to my GA UA api request.
Using equals works as expected 'ga:keyword==(not provided),ga:keyword==(not set)' this will return the expected result
Not equals does not work 'ga:...
0
votes
1
answer
408
views
Ruby require - cannot load such file -- google/api_client
I'm trying to write a ruby script to upload youtube videos, but I can't get past this line:
require 'google/api_client'
I get this error:
`require': cannot load such file -- google/api_client (...
1
vote
2
answers
469
views
Google Analytics Reporting v4 with streams instead of views
I've just created a new Google Analytics property and it now defaults to data streams instead of views.
I had some code that was fetching reports through the API that I now need to updated to work ...
1
vote
1
answer
388
views
Ruby - Google Analytics 4, where is the view_id?
So i have a project where i use 'google/apis/analytics_v3' to make some requests and get some data, the thing is that i need a view_id to do that.
@service.get_ga_data(VIEW_ID, @start_date, @end_date, ...
1
vote
0
answers
218
views
Google My Business API always return Invalid Requests
I'm building an app that get all the google reviews from the connected user.
I want to use Google My Business API for that.
I have made all the prerequisites Google asked for, and I have activated the ...
0
votes
1
answer
586
views
How to upload a file to a shared drive with Google API Drive v3 ruby gem
I am trying to upload a file to a shared drive, however; if I set my drive_id in the options parameters, it still used my default drive, which is "My Drive".
What am I doing wrong? (The ...
0
votes
1
answer
339
views
Google Service Account doesn't have permission to create folder
In Google Cloud Platform, I created a project.
Then I enabled Google Drive API for that project.
Then I created a service account.
I was able to upload file to Google Drive with that service account ...
1
vote
0
answers
21
views
Is the Google auth documentation out of date? Is the Google QuickStart guides still relevant for Gmail API? [duplicate]
I am using a command line Ruby script to access emails in a Gmail inbox.
The documentation is here for the Google Auth library for Ruby: https://github.com/googleapis/google-auth-library-ruby
The Ruby ...
0
votes
1
answer
95
views
YouTube Data API v3 update_video fails with ArgumentError
Problem
Using the google-apis-youtube_v3 gem I can upload a video, delete a video, insert captions, delete captions, and set a thumbnail image. The only thing that that for some reason does not work ...
1
vote
0
answers
49
views
How to retrieve full size user profile photo now that GooglePlus is deprecated?
Our service implemented code in 2015 to pull original photo of user profiles from the GooglePlus API using the ruby gem google-api-client
And although we can still pull photos for a lot of the older ...
0
votes
1
answer
163
views
Ruby YouTube Data API v3 insert caption always returns error
I am trying to use the Ruby SDK to upload videos to YouTube automatically. Inserting a video, deleting a video, and setting the thumbnail for a video works fine, but for some reason trying to add ...
0
votes
0
answers
512
views
How do I refresh my google_oauth2 access token and refresh token?
I have an app that uses the Google Calendar API and I seem to have a corrupt/defunct access token and/or refresh token which is resulting in the following error:
Signet::AuthorizationError
...
1
vote
0
answers
221
views
Authenticating to Google Vault API -- getting 400 response with message: "The user does not belong to a G Suite customer."
I'm trying to do a simple query from the Google Vault API using JSON credentials provided from the Google API console for a service account. I'm getting a 400 response (Invalid Request / Invalid ...
2
votes
1
answer
174
views
Getting notFound error after domain wide delegation
I am trying to set up domain wide delegation with Google so I can have access to a workspace calendar. I've followed through the documentation and here is what I've got so far:
Service account for ...
1
vote
1
answer
739
views
Can GA4-API fetch the data from requests made with a combination of minute and region and sessions?
Problem
With UA, I was able to get the number of sessions per region per minute (a combination of minute, region, and sessions), but is this not possible with GA4?
If not, is there any plan to support ...
0
votes
1
answer
582
views
Every error in the book from google-api-ruby-client but no data
I have been attempting to work on a request from my boss this week that requires using the google admin directory api.
At this point I am questioning if what I am trying to do is even possible.
Can I ...
1
vote
1
answer
421
views
Expected top level property 'installed' or 'web' to be present. google-apis-ruby quickstart
I have been attempting to get device information using the google/apis/admin_directory_v1 api.
I found a ruby quickstart that happens to use this exact api in the example. However when I follow the ...
1
vote
0
answers
534
views
Google Sheets API: Error 400: redirect_uri_mismatch
I keep getting Authorization errors when sending a POST request from my React/Ruby app. I'm getting different errors depending on what OOB_URI I'm using.
If I use
OOB_URI = "urn:ietf:wg:oauth:2.0:...
1
vote
2
answers
665
views
Erro to connect Google Sheets API
I'm trying to follow these Ruby quickstart code(https://developers.google.com/sheets/api/quickstart/ruby#step_2_set_up_the_sample),
require "google/apis/sheets_v4"
require "googleauth&...
0
votes
1
answer
477
views
After create user by firebase authentication, is there a way to generate email verification link and send it to the user?
Below is code to create user by firebase authentication.
require 'google/apis/identitytoolkit_v3'
service_account = "./firebase-auth.json"
service = Google::Apis::IdentitytoolkitV3::...
1
vote
1
answer
438
views
Updating a worksheetsheet within a Google Spreadsheet (ruby api)
I have figured out a way to add a new worksheet to a an existing spreadsheet BUT I can't seem to figure out how to format the added worksheet.
For example, I can color the header row of the first ...
2
votes
1
answer
655
views
google-api-ruby-client: batchupdate spreadsheet values
Following the instructions laid out here to perform a batch update.
First, I built out the required ValueRange object like so:
values = [
["first", "title", "second", &...
0
votes
1
answer
787
views
How can I store Google API Credentials using Rails Secrets?
This question is similar to How can I authorize a Google Service Account without the default credentials file? but specifically about how to use Rails' built in secrets/credentials functionality.
I ...
0
votes
0
answers
59
views
People API: Cannot overcome error: rateLimitExceeded: Resource has been exhausted [duplicate]
I'm using Google API Client (ruby) to access the People API and create/update my Google Contacts. I've successfully authenticated using a OAuth 2.0 flow, and have managed to use the API's methods to ...
4
votes
0
answers
889
views
How can i integrate Gmail API and send email from rails Application?
i want send email from my rails application by integrating the Gmail API(Oauth Authentication).
When i check the doucumentation, there is a code available for google drive integration only(https://...
1
vote
1
answer
774
views
Email attachment sent as encoded text
I'm sending an email with one or more attachments, I create the email using Mail gem, here's the code
mail = Mail.new
mail.to = to
mail.subject = subject
mail.body = email_body
mail.content_type = '...
0
votes
1
answer
567
views
Get Gmail User Profile Picture and Name with Google API client
The Google API client has Class: Google::Apis::PeopleV1::Name and Google::Apis::PeopleV1::Photo how do I hit these endpoints? I tried
p = Google::Apis::PeopleV1::Photo.new
response = p.url
But it ...
1
vote
2
answers
508
views
Unable to send Gmail Message with Gmail API
Using the Gmail Service to send an email, but I'm having problem with the email format which needs to be passed to Google::Apis::GmailV1::Message, I'm passing raw parameter to it in the following ...
1
vote
2
answers
854
views
Get gmail attachment's downloading URL?
I am fetching Gmail Attachment through Gmail API using the get_user_message_attachment method , but the data it sends is in Base64 encoded form. I want to get the attachment's downloadable URL, which ...
0
votes
1
answer
426
views
OAuth2: RuntimeError: A refresh_token is not available
I use OAuth2::Client for get access_token.
Need refresh it with refresh_token
client_id = '95585XXXXXXXoogleercontent.com'
secret_key = 'R10Ze490IYa'
client = OAuth2::Client.new(client_id, secret_key, ...
1
vote
1
answer
850
views
Authorization Error, Error 400: redirect_uri_mismatch Gmail API
I am following this Ruby Gmail API quickstart guide to authorize a user for the Gmail API. I've created a Web Application type app at Google console and generated it's credentials.json file(and placed ...
0
votes
0
answers
120
views
Google API for Ruby: Getting "rate-limited" without exceeding limit?
I am using Google API library for Ruby to read data. The access is restricted to the IP addresses I use. The API is restricted to two endpoints. The rate usage in the console says I am at 8% of the ...
0
votes
1
answer
158
views
GMail API Stopped working with Ruby client since April 11
Was any breaking change made by Google on GMail API on 11th April, 2020 ?
We have a ruby web application which also has a Chrome extension. (pretty old, ruby 2.1.0) which uses google-api-client ...
1
vote
1
answer
760
views
3-legged OAuth and one-time-code flow using google-auth-library-ruby with google-api-ruby-client
Quick Overview: I have a ruby app that runs nightly and does something with a user's google calendar. The user has already given access via a separate react app. I'm having trouble getting the ruby ...
1
vote
0
answers
960
views
Error special characters Google Sheets api v4 with ruby
When I add values with special characters (example: ñ) to a Google Sheets api v4 receive this error
I use Ruby 2.5.7 with Sinatra on Windows
This is my code :
# encoding: UTF-8
Encoding....
2
votes
2
answers
345
views
How to avoid displaying the results of an API query when assigning a variable
I am using the google-api-client gem to interact with Google Calendar.
When saving a list of events like this:
@events = calendar.list_events(@tmpcalendar)
The output of calendar.list_events(@...
0
votes
1
answer
928
views
How to use auth token in Google API (Ruby) WebmastersV3 (service account access)
I cannot connect the two pieces together: I am able to authenticate my service account and I know how to form the request for the information I need to retrieve from the API, but I cannot figure out ...
3
votes
1
answer
304
views
google-api-ruby-client: Request serialization results in empty requests
replacement_requests = [
Google::Apis::DocsV1::ReplaceAllTextRequest.new(contains_text: "{{name}}", replace_text: "Joe"),
Google::Apis::DocsV1::ReplaceAllTextRequest.new(contains_text: "{{age}}", ...
1
vote
0
answers
370
views
Methods are Undefined
I have a legacy Rails app, and I'm trying to get Google Search Console data to show to customers. I have successfully gotten authorization to work, however, when I try to access any of the methods ...
4
votes
2
answers
163
views
Trying to access GSuite Admin account users gives '401 - Login required'
I have setup a new project to access my GSuite account users. When I run my code it gives 401 - 'Login required'.
I have granted 'Domain wide authority' to the account with the required scopes.
The ...
1
vote
1
answer
507
views
Getting server error on firebase dynamic link CreateManagedShortLinkRequest with the Ruby client
I am trying to create a dynamic link using the Ruby SDK. I believe I have everything right, but I'm getting a
Google::Apis::ServerError: Server error
When creating the URL
Could you help me ...
1
vote
1
answer
277
views
Google API Server-to-Server Communication not working (Ruby implementation)
I have followed all the steps to set up a Domain-Wide Delegation of Authority (https://developers.google.com/admin-sdk/reports/v1/guides/delegation) and followed this link too (https://developers....
-1
votes
1
answer
169
views
Getting Error - #<Google::Apis::ServerError: unsupported proxy proxy.xyz.com:8080> while configuring proxy for google-api-ruby-client-0.10.0 gem
I am using google-drive-ruby gem for integrating Google-Drive in my rails project. google-drive-ruby gem has run time dependency on google-api-ruby-client gem.
I am trying to configure proxy in ...
9
votes
0
answers
1k
views
Fail to upload apk to beta track. Google Api Error: releaseToHaltNotFound: Cannot halt release, no matching in progress release found
I am using fastlane to upload apks to google play beta track. I have multiple apks for different countries with different package names.
A few days ago, it failed to upload one of my apk.
Fastlane ...
2
votes
2
answers
701
views
GmailV1/GmailService get_user_messages
google-api-ruby-client doc
I am wondering why function get_user_messages only has 1 parameter user_id even though in doc, they have more than that.
I'm using this version:
gem install google-api-...
0
votes
1
answer
235
views
How can I make transfers using Google Data Transfer API in Ruby
I'm writing a piece of code in Ruby for making data transfers using Google Data Transfer API. I specifically mean this
The code I have is as follows:
idOldUser = "116170568974079979335"
idNewUser = "...
1
vote
1
answer
297
views
How to find token for Google sheet API v4
I am using ruby to read google sheet by using steps given here:
Ruby Quickstart
Anyone, please let me know the structure of token.yml or where to find this file.
1
vote
4
answers
5k
views
Rails w/ Google API Client: header field value cannot include CR/LF
ArgumentError in Users::OmniauthCallbacksController#google_oauth2
header field value cannot include CR/LF
Really unsure where this error is coming from.
I'm using ruby 2.5, Rails 5, and google-api-...
3
votes
1
answer
665
views
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,...