0

I created a simple cloud function from a template and it got assigned a url as a trigger https://us-central1-myapp-dev.cloudfunctions.net/naguib-testing

Then I created a Pub/Sub Topic and tried to subscribe that url to it but I got an INVALID_ARGUMENT error appear on the console screen.

I went through a similar SO question where the solution is to verify that I own the domain I am trying to connect to, but I don't own cloudfunctions.net :/

I can't understand how that's not supposed to work or what should I be doing?

Naguib Ihab
  • 4,259
  • 7
  • 44
  • 80

1 Answers1

2

Cloud Functions can be created as HTTP functions (as you did) or as Background functions. The latter is automatically invoked via a message on a Google Cloud Pub/Sub topic for example. I believe this is exactly what you'd need here.

However, if for some reason you do prefer to use your HTTP function as Pub/Sub push endpoint, you may be interested in this SO answer, where the site verification is done via an HTML tag.

LundinCast
  • 9,412
  • 4
  • 36
  • 48