I have been playing around with the Pub/Sub REST API on Google App Script.
I have tried, without success, to create a subscriber with a push end point at script.google.com. The push end point URL was created with the StateTokenBuilder API, which requires a query parameter to be present on the end point URL. The query parameter is further used to forward any request at the URL to a javascript function inside the app.
Is it allowed to have a push end point URL with a query parameter?
However, even if it is allowed, I am unable to register for a push end point at the domain script.google.com. I am required to assert ownership of any domain other than appspot.com.
Do you guys know of any workaround? Am I doing something wrong?
This is the error I am getting:
"error": {
"code": 400,
"message": "Invalid push endpoint given (endpoint=https://script.google.com/macros/s/.../usercallback?state=...). Refer to https://cloud.google.com/pubsub/subscriber#create for more information.",
"status": "INVALID_ARGUMENT"
}
Thank you!