Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

.net core and Pub/Sub notification

We are trying to integrate the pub/sub notification in api project. following are the configuration we have done in google console. 
We are facing error regarding preconditional fail in push message endpoint. 

teamevisionits_0-1720777082439.png

 

teamevisionits_1-1720777181472.png

teamevisionits_2-1720777246689.png

 

 

0 2 182
2 REPLIES 2

Hello,

Thank you for contacting Google Cloud Community!

Based on the information you provided and the image you sent, it seems you're encountering a pre-condition failure error while setting up Pub/Sub notifications in your API project using Google Cloud Console. The image shows code related to setting up a watch request for a Gmail topic using the Gmail API.

Here are some potential reasons for the pre-condition failure error and troubleshooting steps:

  • Ensure the credentials used in your code (credential.json file) have the required permissions to create Pub/Sub subscriptions. The credential should have the pubsub.subscriptions.create scope. You can check and modify IAM permissions in the Google Cloud Console.
  • If using a service account, verify that the credentials haven't expired. Expired credentials will lead to authentication errors.
  • Check if your project has reached its quota for Pub/Sub resources like subscriptions. You can view and manage quotas in the Google Cloud Console.
  • Double-check that the topic path you're specifying in the watchRequest is accurate and matches the existing Pub/Sub topic you want to use.
  • Ensure your code has the necessary permissions to access the Pub/Sub topic you're referencing.

Regards,
Jai Ade

Hello,

Thank you for your engagement regarding this issue. We haven’t heard back from you regarding this issue for sometime now. Hence, I'm going to close this issue which will no longer be monitored. However, if you have any new issues, Please don’t hesitate to create a new issue. We will be happy to assist you on the same.

Regards,
Jai Ade