"code": 7, "details": "Permission denied on resource Space (or it might not exist)"

I am using ADC for authorization and when I tried to create a meeting space with the below code (The sample code given in the google meet API Documentation) with nodeJs I am receiving this error. This is my first time working with google cloud please guide me through this. I have created and impersonated the service account successfully and I am the owner of this project .

const space = {}

    // Imports the Meet library
    const {SpacesServiceClient} = require('@google-apps/meet').v2;

    // Instantiates a client
    const meetClient = new SpacesServiceClient();

    async function callCreateSpace() {
      // Construct request
      const request = {
      };

      // Run request
      const response = await meetClient.createSpace(request);
      console.log(response);
      res.send(response);
    }

    callCreateSpace().catch((err) => {
      console.log(err);
      res.send(err);
    });
1 Like