title: Google My Business API always return Invalid Requests
body: <p>I'm building an app that <em><strong>get all the google reviews from the connected user</strong></em>.</p>
  <p>I want to use Google My Business API for that.</p>
  <p>I have made all the prerequisites Google asked for, and I have activated the API in my project, as well as asked the user for the authorizations.</p>
  <p>The Google My Business API being private, I couldn't find the gem for it on <a href="https://github.com/googleapis/google-api-ruby-client" rel="nofollow noreferrer">https://github.com/googleapis/google-api-ruby-client</a></p>
  <p>So, following the steps described in <a href="https://github.com/googleapis/google-api-ruby-client/issues/662" rel="nofollow noreferrer">this GitHub Issue</a>, I generated the API in my project form this <a href="https://developers.google.com/static/my-business/samples/mybusiness_google_rest_v4p9.json" rel="nofollow noreferrer">Discovery File</a>.</p>
  <p>The generated API is in my rails project in <code>lib/google-apis-mybusiness_v4</code></p>
  <p>In my Gemfile:</p>
  <pre><code>gem &quot;google-apis-mybusiness_v4&quot;, path: &quot;lib/google-apis-mybusiness_v4&quot;
  </code></pre>
  <p>the code I tried (the user is connected successfully):</p>
  <pre><code>require &quot;google/apis/mybusiness_v4&quot;
  
  #...
  secrets = Google::APIClient::ClientSecrets.load(&quot;./code_secret_client.json&quot;)
  authorizer = secrets.to_authorization
  authorizer.update!(scope: &quot;https://www.googleapis.com/auth/business.manage&quot;, access_token: user.token )
  
  service = Google::Apis::MybusinessV4::MyBusinessService.new
  service.authorization = authorizer
  
  service.list_accounts #=&gt; Google::Apis::ClientError: Invalid request
  
  </code></pre>
  <p>I showed <code>list_account</code> here but any function of MyBusinessService returns <code>Google::Apis::ClientError: Invalid request</code></p>
  <p>I also tried tu use some other google APIs, but fetching the gems from ruby-gem, and it works with the same code</p>
  <p>Example:</p>
  <pre><code>#Gemfile
  gem 'google-apis-mybusinessaccountmanagement_v1', '~&gt; 0.1'
  
  #code
  require &quot;google/apis/mybusinessaccountmanagement_v1&quot;
  
  secrets = Google::APIClient::ClientSecrets.load(&quot;./code_secret_client.json&quot;)
  authorizer = secrets.to_authorization
  authorizer.update!(scope: &quot;https://www.googleapis.com/auth/business.manage&quot;, access_token: user.token )
  
  service_management = Google::Apis::MybusinessaccountmanagementV1::MyBusinessAccountManagementService.new
  service_management.authorization = authorizer
  
  service_management.list_accounts(options: { authorization: authorizer }) #=&gt; successfully lists all the accounts
  
  </code></pre>
  <p>(I don't know why I have to specify the authorization again in the options, but it only works that way. Also I tried <code>service.list_accounts(options: { authorization: authorizer })</code> with the MyBusinessService list_accounts as well, same error, <code>Google::Apis::ClientError: Invalid request</code> )</p>
  <p>This is the first time I've used a gem this way, so maybe I made mistakes that would explain the error I'm getting.</p>