Open markhorrocks opened 6 months ago
require 'googleauth'
SERVICE_ACCOUNT_PRIVATE_KEY = "-----BEGIN PRIVATE KEY-----MIIE1234ABCD-----END PRIVATE KEY-----"
begin credentials = Google::Auth::ServiceAccountCredentials.make_creds( scope: "https://analyticsreporting.googleapis.com/v4/reports:batchGet", json_key: SERVICE_ACCOUNT_PRIVATE_KEY ) rescue => error puts "Error: #{error.message}" end
I got the same issue this morning.
Steps to reproduce
! /usr/bin/ruby
require 'googleauth'
SERVICE_ACCOUNT_PRIVATE_KEY = "-----BEGIN PRIVATE KEY-----MIIE1234ABCD-----END PRIVATE KEY-----"
begin credentials = Google::Auth::ServiceAccountCredentials.make_creds( scope: "https://analyticsreporting.googleapis.com/v4/reports:batchGet", json_key: SERVICE_ACCOUNT_PRIVATE_KEY ) rescue => error puts "Error: #{error.message}" end