title: TO get to know the status of our Cloud function in GCP
body: <p>I am trying to know whether the cloud function URL is always responding or not, It is important to know the status of the URL and show it in GCP monitoring.</p>
  <p>Is it possible to know whether it is active or not. If it is possible can anyone help me with sample code.</p>
  <p>I am trying like below,</p>
  <pre class="lang-py prettyprint-override"><code>os.environ[&quot;GOOGLE_APPLICATION_CREDENTIALS&quot;] = &quot;sa.json&quot;
  
  cf_url = f'https://{region}-{self.cf_project_id}.cloudfunctions.net/{self.cf_name}'
  
  var1=requests.get(cf_url)
  
  print(var1.status_code)
  </code></pre>
  <p>I am expecting this get call should give me status code 200 to know that the CF URL is up and fine. But I am getting status 403.</p>
  <p>That Service account is having Cloud Function Viewer access!</p>