Skip to content
New issue

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

unable to get list of questions by location name #2626

Open
devsravi opened this issue Sep 9, 2024 · 0 comments
Open

unable to get list of questions by location name #2626

devsravi opened this issue Sep 9, 2024 · 0 comments

Comments

@devsravi
Copy link

devsravi commented Sep 9, 2024

PLEASE READ:
We are using https://developers.google.com/my-business/reference/qanda/rest/v1/locations.questions/list to get locations questions and answers but every time i am getting error
error": {
"code": 400,
"message": "Request contains an invalid argument."
}


<?php

use Google\Service\MyBusinessQA;

public function getLocationsQA($googleClient, $locationName, $nextPageToken = null)
    {
        try {
            $optParams = [
                'pageSize' => 10,
                'pageToken' => $nextPageToken,
            ];
            $service = new MyBusinessQA($googleClient);
            $response = $service->locations_questions->listLocationsQuestions($locationName, $optParams);
            return $response;
        } catch (\Exception $e) {
            Log::warning('Error message: ' . $e->getMessage());
        }
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant