Multiple query parameters in cloud function returns 403

When trying to use multiple query parameters in a cloud function I get a 403 error code.  A single parameters works but the second I add multiple I get the following error:

<html><head>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<title>403 Forbidden</title>
</head>
<body text=#000000 bgcolor=#ffffff>
<h1>Error: Forbidden</h1>
<h2>Your client does not have permission to get URL <code>/?clientName=Test</code> from this server.</h2>
<h2></h2>
</body></html>

I am doing this from an authenticated cloud shell and it works if I only have 1 paremeter.  My problem is the end goal of the project is to be able to trigger this with a multi parameter get instead of a POST with a JSON body (it works when I post as well)

0 7 820
7 REPLIES 7

Still getting this, works when I post to it.  I believe it has something to do with the permissions of the URL... and the URL being different after adding the parameters. Any advise is appreciated

Hi @dnoodles,

Welcome to Google Cloud Community!

You may want to check this link of the list of Troubleshooting Cloud Functions errors. Since you mentioned that you're getting 403 error, this is most likely due to permission issue and you need to add or request for additional roles that would allow you to proceed with the authentication and afterwards deployment.

Im able to do single query parameter GET invokes as well as POST invokes with json objects.  Seems to be something with the permissions on the URL once it has more than one parameter.

Still having this issue, any help is appreciated!

Still having this issue, even when testing with the generated curl in gconsole it still does not work!

I am getting the same problem . please advice. 

Try wrapping the Cloud Function URL in quotations like so:

curl "https://us-central1-test-cf-1213212.cloudfunctions.net/content?kind=event&version=101" -H "Authorization: Bearer $(gcloud auth print-identity-token)"

This resolved the issue for me.