29
votes

Created a test topic on GC pubsub and can create pull subscriptions no problem but as soon as I try to create a URL endpoint subscription I get a "pubsub error INVALID_ARGUMENT"

Params Subscription Name: testingsub Endpoint URL: https://requestb.in/1iztlqt1

Any ideas what I am doing wrong

4
I'm hitting the same error as you @adam-mccrory, going through the same flow. Any luck resolving it? When I go to look at the error I see this: {"code":4,"trackingId":9060032922890481827,"errorSpace":"core","status":400,"message":"A required request parameter is missing. That\u0027s all we know."}nicoslepicos

4 Answers

24
votes

If you look at the message returned with this error, you should get some more details. A common cause of this issue is that you haven't registered the endpoint. You need to verify that you own the domain in order to register it as a push endpoint.

24
votes

Make sure your domain is registered.
https://www.google.com/webmasters/verification
Easiest method in my opinion, is the html file upload.

Registering domain is not enough, you also need to add it here: https://console.cloud.google.com/apis/credentials/domainverification

3
votes

It's an old post. But still for the people who are still facing this issue. I went through the same issue. What solved my problem:

  1. Registered my domain in console.developers.google.com by adding a TXT record like 'google-site-verification=hfjhvhjvjhvjvjvhjvjvjhvjv' in my domain registrar DNS zone panel.
  2. Instead of using http://duskylory.store as a protocol, I had to use https://duskylory.store. Apparently, they accept https as a protocol as written in pub/sub trouble shoot page.
2
votes

There are multiple, possible causes for this but for me it was just an incorrect spelling of the endpoint URL. I had to add a trailing slash.

This appeared to be incorrect: https://example.com/pubsub_entry The correct spelling should be: https://example.com/pubsub_entry/

I spent at least 30 minutes verifying the Cloud Function's endpoint and then still got the same error because of the spelling. This might be a solution to your problem since you did not add a trailing slash.

The error feedback on this is terrible!