Questions tagged [google-auth-library-ruby]

7 questions
4
votes
2 answers

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 code that I am using is: def authorize authorizer…
4
votes
1 answer

Unauthorized client error when using domain wide delegation with Google API

We are using Google API Ruby client with Domain Wide Delegation to update users' contacts, parse emails to pair them with our DB etc. Before April 1st everything was working just fine, however, since then we get unauthorized_client error…
1
vote
0 answers

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 Argument) with the message: The user does not belong…
1
vote
0 answers

Ruby Google::Auth::WebUserAuthorizer throw undefined get method exception

Below is example code which i am running: require 'googleauth' require 'googleauth/web_user_authorizer' require 'googleauth/stores/redis_token_store' require 'redis' client_id = Google::Auth::ClientId.from_file('/path/to/client_secrets.json') scope…
1
vote
1 answer

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 app to access the user's calendar with the…
1
vote
1 answer

Get Refresh Token with lib google-drive-ruby

From article: https://github.com/gimite/google-drive-ruby/blob/master/doc/authorization.md Code: credentials = ... same as above ... credentials.code = authorization_code credentials.fetch_access_token! Then If you want to restore a session…
mpz
  • 1,906
  • 3
  • 15
  • 23
0
votes
1 answer

Access Cloud Function via HTTP from ruby client, using google auth gem

I'm trying to use the ruby googleauth gem to authenticate a service account to make an HTTP call to a Cloud Function, without success. Test code: require 'googleauth' class TestService include HTTParty format :json debug_output $stdout def…