sumanta.k
sumanta.k

Reputation: 527

PHP Google Meet Space creation meet api and service account Error: PERMISSION_DENIED: Permission denied on resource Space (or it might not exist)

My code:

// Create a client.
$spacesServiceClient = new SpacesServiceClient([
    'credentials' => '../shortnet-207309-9a0b32f2b4de.json',
    'scopes' => ['https://www.googleapis.com/auth/meetings.space.created'],
]);

// Prepare the request message.
$request = new CreateSpaceRequest();
$response = $spacesServiceClient->createSpace($request);
return response()->json($response, 200);

but I got an error:

{ "message": "Permission denied on resource Space (or it might not exist)", "code": 7, "status": "PERMISSION_DENIED", "details": [] }

what is wrong here? I am first time trying to integrate this google meet rest API.

I am using "google/apps-meet": "^0.2.3".

Upvotes: 1

Views: 117

Answers (1)

Payal Desai
Payal Desai

Reputation: 37

Try to solve the problem with this solution, clarifying that if you have Windows, you apply lines 1 and 3 and it works the same.

php artisan cache:clear
chmod -R 777 storage/
composer dump-autoload

Upvotes: -2

Related Questions