We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
// SET UP GOOGLE CLIENT $this->googleClient = new \Google\Client(); $this->googleClient->setApplicationName("GMB API"); $this->googleClient->setAuthConfig('client_secrets.json'); $this->googleClient->refreshToken($secretToken); $token = $this->googleClient->getAccessToken(); $this->googleClient->setAccessToken($token); $this->gmbQAService = new \Google\Service\MyBusinessQA($this->googleClient); // SET LOCATION $name = "locations/$gmbLocation"; // GET QUESTIONS try { $getQA = $this->gmbQAService->locations_questions->listLocationsQuestions($name); } catch (\Exception $e) { echo $e->getMessage(); } // QUESTIONS DATA echo json_encode($getQA);
This code produces the following output
{ "error": { "code": 400, "message": "Request contains an invalid argument.", "errors": [ { "message": "Request contains an invalid argument.", "domain": "global", "reason": "badRequest" } ], "status": "INVALID_ARGUMENT", "details": [ { "@type": "type.googleapis.com/google.rpc.BadRequest", "fieldViolations": [ { "field": "read_mask", "description": "Field is required" } ] } ] } }
If you add in the "readMask" with the following code
// SET UP GOOGLE CLIENT $this->googleClient = new \Google\Client(); $this->googleClient->setApplicationName("GMB API"); $this->googleClient->setAuthConfig('client_secrets.json'); $this->googleClient->refreshToken($secretToken); $token = $this->googleClient->getAccessToken(); $this->googleClient->setAccessToken($token); $this->gmbQAService = new \Google\Service\MyBusinessQA($this->googleClient); // SET LOCATION $name = "locations/$gmbLocation"; // GET QUESTIONS $optParams = [ "readMask" => ['questions'] ]; try { $getQA = $this->gmbQAService->locations_questions->listLocationsQuestions($name, $optParams); } catch (\Exception $e) { echo $e->getMessage(); } // QUESTIONS DATA echo json_encode($getQA);
You get the following output in the Exception (list) unknown parameter: 'readMask'
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Environment details
Steps to reproduce
Code example
This code produces the following output
If you add in the "readMask" with the following code
You get the following output in the Exception
(list) unknown parameter: 'readMask'
The text was updated successfully, but these errors were encountered: