0
votes

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?

1
I would suggest you to not post the cloud function trigger url publicly.noob
@noob that's ok i changed the name of the app to myapp, that's not the actual urlNaguib Ihab

1 Answers

2
votes

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.