Score:0

how to resolve error like io.grpc.StatusRuntimeException: PERMISSION_DENIED when Implementing google Cloud talent solution api?

ci flag

Description :

Language: Java 8, Framework: Spring Boot

Build type: maven

Tool: Sring Tool Suite

Here I implemented this Google Cloud talent solution API for job search below code :

Code :

GoogleCredentials credentials = GoogleCredentials.fromStream(new FileInputStream(credentialsPath));

// Create a JobServiceClient instance and authenticate with credentials JobServiceClient jobServiceClient = JobServiceClient.create(JobServiceSettings.newBuilder() .setCredentialsProvider(FixedCredentialsProvider.create(credentials)) .build());

// Create a request to list jobs ListJobsRequest request = ListJobsRequest.newBuilder() .setParent(String.format("projects/%s",com.google.cloud.ServiceOptions.getDefaultProjectId())) .setFilter(" java developers jobs in XYZ country") .setPageSize(10) .build();

// Execute the API request and retrieve the response ListJobsPagedResponse response = jobServiceClient.listJobs(request);

// Print out the job details for (com.google.cloud.talent.v4.Job job: response.iterate()) {

 System.out.printf("Job name: %s, job title: %s, job description: %s\n",
   job.getName(), job.getTitle(), job.getDescription());

} // Clean up resources jobServiceClient.close();

Authentication is successfully done after that API call it gives error like :

io.grpc.StatusRuntimeException: PERMISSION_DENIED

{ "code": 403, "errors" : [ { "domain": "global", "message": "The caller does not have permission", "reason" : "forbidden" } ], "message" : "The caller does not have permission", "status" : "PERMISSION_DENIED" }]

So, Anyone who knows about this error or what kind of permission is required to resolve this error any kind of reference please share it is great for me.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.