<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic REST API Access with POST method in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/REST-API-Access-with-POST-method/m-p/3584014#M45768</link>
    <description>&lt;P&gt;Hello Everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am looking for help to setup in PBB the REST API connection with Google Cloud Air Quality service.&lt;/P&gt;&lt;P&gt;Simple GET requests from PBI work just fine with other services such as Distance Matrix but in this case something went wrong.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The code was designed to execute an API request in accordance with the documentation for the "currentConditions" function, but the system returned the following error "Expression.Error Access to the resource is forbidden"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the Google documentation for this method there is no hint on how to design URL, only cURL. I have a suspicion that when Power BI is connected to the Web.Contents function with a POST query instead of GET, it is not able to process this... Is there any way to bypass this, or any recommended solution.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;B.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 14 Dec 2023 13:15:49 GMT</pubDate>
    <dc:creator>BoleslawX</dc:creator>
    <dc:date>2023-12-14T13:15:49Z</dc:date>
    <item>
      <title>REST API Access with POST method</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/REST-API-Access-with-POST-method/m-p/3584014#M45768</link>
      <description>&lt;P&gt;Hello Everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am looking for help to setup in PBB the REST API connection with Google Cloud Air Quality service.&lt;/P&gt;&lt;P&gt;Simple GET requests from PBI work just fine with other services such as Distance Matrix but in this case something went wrong.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The code was designed to execute an API request in accordance with the documentation for the "currentConditions" function, but the system returned the following error "Expression.Error Access to the resource is forbidden"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the Google documentation for this method there is no hint on how to design URL, only cURL. I have a suspicion that when Power BI is connected to the Web.Contents function with a POST query instead of GET, it is not able to process this... Is there any way to bypass this, or any recommended solution.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;B.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Dec 2023 13:15:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/REST-API-Access-with-POST-method/m-p/3584014#M45768</guid>
      <dc:creator>BoleslawX</dc:creator>
      <dc:date>2023-12-14T13:15:49Z</dc:date>
    </item>
    <item>
      <title>Re: REST API Access with POST method</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/REST-API-Access-with-POST-method/m-p/3587838#M45801</link>
      <description>&lt;P&gt;Where's that documentation?&amp;nbsp; Can you show a curl example?&lt;/P&gt;</description>
      <pubDate>Mon, 18 Dec 2023 00:23:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/REST-API-Access-with-POST-method/m-p/3587838#M45801</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2023-12-18T00:23:39Z</dc:date>
    </item>
    <item>
      <title>Re: REST API Access with POST method</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/REST-API-Access-with-POST-method/m-p/3588344#M45807</link>
      <description>&lt;P&gt;Thank you for taking interest in my case.&lt;/P&gt;&lt;P&gt;The documentation of the service can be found here with two sample requests down below.&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.google.com/maps/documentation/air-quality/current-conditions" target="_blank" rel="noopener"&gt;https://developers.google.com/maps/documentation/air-quality/current-conditions&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I do not know how to approach this as Power BI returns error "&lt;SPAN&gt;Expression.Error Access to the resource is forbidden". despite the fact that I have a valid token.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Basic CURL example&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;curl -X POST -d '&lt;STRONG&gt;{
  "location": {
    "latitude": 37.419734,
    "longitude": -122.0827784
  }
}&lt;/STRONG&gt;' \
-H 'Content-Type: application/json' \
'https://airquality.googleapis.com/v1/currentConditions:lookup?key=&lt;SPAN class=""&gt;YOUR_API_KEY&lt;/SPAN&gt;'&lt;BR /&gt;&lt;BR /&gt;and more advanced&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;PRE&gt;curl -X POST -d '&lt;STRONG&gt;{
  "universalAqi": true,
  "location": {
    "latitude": 37.419734,
    "longitude": -122.0827784
  },
  "extraComputations": [
    "HEALTH_RECOMMENDATIONS",
    "DOMINANT_POLLUTANT_CONCENTRATION",
    "POLLUTANT_CONCENTRATION",
    "LOCAL_AQI",
    "POLLUTANT_ADDITIONAL_INFO"
  ],
  "languageCode": "en"
}&lt;/STRONG&gt;' \
-H 'Content-Type: application/json' \
'https://airquality.googleapis.com/v1/currentConditions:lookup?key=&lt;SPAN class=""&gt;YOUR_API_KEY&lt;/SPAN&gt;'&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Dec 2023 08:01:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/REST-API-Access-with-POST-method/m-p/3588344#M45807</guid>
      <dc:creator>BoleslawX</dc:creator>
      <dc:date>2023-12-18T08:01:48Z</dc:date>
    </item>
  </channel>
</rss>

