<?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 Re: Response status error code 403 while using api in Next-Generation Firewall Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/next-generation-firewall/response-status-error-code-403-while-using-api/m-p/556245#M1796</link>
    <description>&lt;P&gt;Hi &lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/310948"&gt;@ssovee&lt;/a&gt; ,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That's a good start!&amp;nbsp; I have a couple of observations:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Invalid Credential most likely means the key is wrong.&amp;nbsp; You may want to double check the key.&lt;/LI&gt;
&lt;LI&gt;You have too much in your 2nd URL.&amp;nbsp; You should get rid of the "&amp;lt;request cmd="op"&amp;gt;&amp;lt;operations&amp;gt;" and "&amp;lt;/operations&amp;gt;&amp;lt;/request&amp;gt;".&amp;nbsp; Those were not in your 1st URL and not needed.&lt;/LI&gt;
&lt;LI&gt;Have you tried the XML API Browser?&amp;nbsp; You can drill down in the menu and get the exact URL syntax you need.&amp;nbsp; You can also add the "all" keyword (which is correct) and click Submit to test.&amp;nbsp; You can fully test your XML syntax before using it in curl.&lt;/LI&gt;
&lt;LI&gt;The command curl -k -X GET "https://a.b.c.d/api/?type=op&amp;amp;cmd=&amp;lt;show&amp;gt;&amp;lt;virtual-wire&amp;gt;all&amp;lt;/virtual-wire&amp;gt;&amp;lt;/show&amp;gt;&amp;amp;key=CorrectKey" works for me.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&lt;A href="https://docs.paloaltonetworks.com/pan-os/9-1/pan-os-panorama-api/get-started-with-the-pan-os-xml-api/explore-the-api/use-the-api-browser" target="_blank"&gt;https://docs.paloaltonetworks.com/pan-os/9-1/pan-os-panorama-api/get-started-with-the-pan-os-xml-api/explore-the-api/use-the-api-browser&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Tom&lt;/P&gt;</description>
    <pubDate>Sat, 02 Sep 2023 14:23:49 GMT</pubDate>
    <dc:creator>TomYoung</dc:creator>
    <dc:date>2023-09-02T14:23:49Z</dc:date>
    <item>
      <title>Response status error code 403 while using api</title>
      <link>https://live.paloaltonetworks.com/t5/next-generation-firewall/response-status-error-code-403-while-using-api/m-p/555801#M1779</link>
      <description>&lt;P&gt;Hello all. I'm trying to get started with some API work on my PAN OS. I walked through the Getting Started guide and I created a user, assigned an admin role to it that had API access, and then generated a key.&lt;BR /&gt;While I am using curl -k -X GET "https://a.b.c.d/api/?type=op&amp;amp;cmd=&amp;lt;show&amp;gt;&amp;lt;system&amp;gt;&amp;lt;info&amp;gt;&amp;lt;/info&amp;gt;&amp;lt;/system&amp;gt;&amp;lt;/show&amp;gt;&amp;amp;key=LUFRPT1.....cQ==" it shows &amp;lt;response status="success"&amp;gt; but while I am trying curl -k -X GET "&lt;A href="http://10.202.32.166/api/?type=op&amp;amp;cmd=" target="_blank" rel="noopener"&gt;https://a.b.c.d/api/?type=op&amp;amp;cmd=&lt;/A&gt;&amp;lt;request cmd="op" cookie="7671262853440057" uid="1004"&amp;gt;&amp;lt;operations&amp;gt;&amp;lt;show&amp;gt;&amp;lt;virtual-wire&amp;gt;all&amp;lt;/virtual-wire&amp;gt;&amp;lt;/show&amp;gt;&amp;lt;/operations&amp;gt;&amp;lt;/request&amp;gt;&amp;amp;key=LUFRPT1.....cQ==" it shows "&amp;lt;response status = 'error' code = '403'&amp;gt;&amp;lt;result&amp;gt;&amp;lt;msg&amp;gt;Invalid Credential&amp;lt;/msg&amp;gt;&amp;lt;/result&amp;gt;&amp;lt;/response&amp;gt;" .&lt;BR /&gt;Even while I am trying to create address group facing the same issue.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Aug 2023 06:44:24 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/next-generation-firewall/response-status-error-code-403-while-using-api/m-p/555801#M1779</guid>
      <dc:creator>ssovee</dc:creator>
      <dc:date>2023-08-30T06:44:24Z</dc:date>
    </item>
    <item>
      <title>Re: Response status error code 403 while using api</title>
      <link>https://live.paloaltonetworks.com/t5/next-generation-firewall/response-status-error-code-403-while-using-api/m-p/555962#M1784</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/310948"&gt;@ssovee&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You are using a cookie value in the curl request.&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;cookie="7671262853440057" uid="1004"&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Can you remove this value and test the status?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Aug 2023 05:12:57 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/next-generation-firewall/response-status-error-code-403-while-using-api/m-p/555962#M1784</guid>
      <dc:creator>akuzhuppilly</dc:creator>
      <dc:date>2023-08-31T05:12:57Z</dc:date>
    </item>
    <item>
      <title>Re: Response status error code 403 while using api</title>
      <link>https://live.paloaltonetworks.com/t5/next-generation-firewall/response-status-error-code-403-while-using-api/m-p/556242#M1795</link>
      <description>&lt;P&gt;Getting the same result....&lt;/P&gt;
&lt;P&gt;curl -k -X GET "https://a.b.c.d/api/?type=op&amp;amp;cmd=&amp;lt;request cmd="op"&amp;gt;&amp;lt;operations&amp;gt;&amp;lt;show&amp;gt;&amp;lt;virtual-wire&amp;gt;all&amp;lt;/virtual-wire&amp;gt;&amp;lt;/show&amp;gt;&amp;lt;/operations&amp;gt;&amp;lt;/request&amp;gt;&amp;amp;key=L.................FqcQ=="&lt;BR /&gt;&amp;lt;response status = 'error' code = '403'&amp;gt;&amp;lt;result&amp;gt;&amp;lt;msg&amp;gt;Invalid Credential&amp;lt;/msg&amp;gt;&amp;lt;/result&amp;gt;&amp;lt;/response&amp;gt;&lt;/P&gt;</description>
      <pubDate>Sat, 02 Sep 2023 08:08:58 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/next-generation-firewall/response-status-error-code-403-while-using-api/m-p/556242#M1795</guid>
      <dc:creator>ssovee</dc:creator>
      <dc:date>2023-09-02T08:08:58Z</dc:date>
    </item>
    <item>
      <title>Re: Response status error code 403 while using api</title>
      <link>https://live.paloaltonetworks.com/t5/next-generation-firewall/response-status-error-code-403-while-using-api/m-p/556245#M1796</link>
      <description>&lt;P&gt;Hi &lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/310948"&gt;@ssovee&lt;/a&gt; ,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That's a good start!&amp;nbsp; I have a couple of observations:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Invalid Credential most likely means the key is wrong.&amp;nbsp; You may want to double check the key.&lt;/LI&gt;
&lt;LI&gt;You have too much in your 2nd URL.&amp;nbsp; You should get rid of the "&amp;lt;request cmd="op"&amp;gt;&amp;lt;operations&amp;gt;" and "&amp;lt;/operations&amp;gt;&amp;lt;/request&amp;gt;".&amp;nbsp; Those were not in your 1st URL and not needed.&lt;/LI&gt;
&lt;LI&gt;Have you tried the XML API Browser?&amp;nbsp; You can drill down in the menu and get the exact URL syntax you need.&amp;nbsp; You can also add the "all" keyword (which is correct) and click Submit to test.&amp;nbsp; You can fully test your XML syntax before using it in curl.&lt;/LI&gt;
&lt;LI&gt;The command curl -k -X GET "https://a.b.c.d/api/?type=op&amp;amp;cmd=&amp;lt;show&amp;gt;&amp;lt;virtual-wire&amp;gt;all&amp;lt;/virtual-wire&amp;gt;&amp;lt;/show&amp;gt;&amp;amp;key=CorrectKey" works for me.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&lt;A href="https://docs.paloaltonetworks.com/pan-os/9-1/pan-os-panorama-api/get-started-with-the-pan-os-xml-api/explore-the-api/use-the-api-browser" target="_blank"&gt;https://docs.paloaltonetworks.com/pan-os/9-1/pan-os-panorama-api/get-started-with-the-pan-os-xml-api/explore-the-api/use-the-api-browser&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Tom&lt;/P&gt;</description>
      <pubDate>Sat, 02 Sep 2023 14:23:49 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/next-generation-firewall/response-status-error-code-403-while-using-api/m-p/556245#M1796</guid>
      <dc:creator>TomYoung</dc:creator>
      <dc:date>2023-09-02T14:23:49Z</dc:date>
    </item>
    <item>
      <title>Re: Response status error code 403 while using api</title>
      <link>https://live.paloaltonetworks.com/t5/next-generation-firewall/response-status-error-code-403-while-using-api/m-p/556246#M1797</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;It works for me. Thank you. I went through the document you shared.&amp;nbsp;&lt;BR /&gt;I have created an address group and at the same time browse &lt;A href="https://firewall/debug" target="_blank"&gt;https://firewall/debug&lt;/A&gt;&amp;nbsp;page. Then found the output below.&lt;/P&gt;
&lt;P&gt;[2023/09/02 21:00:43] &amp;#27;[44m panui_core\mgmt\MSConnection &amp;#27;[0m (DEBUG) 5877532556119778 - -&lt;BR /&gt;socket 106 sending request &amp;lt;request cmd="complete" obj="/config/devices/entry[@name='localhost.localdomain']/vsys" cookie="5877532556119778"/&amp;gt;&lt;BR /&gt;[2023/09/02 21:00:43] &amp;#27;[44m panui_core\mgmt\MSConnection &amp;#27;[0m (DEBUG) 5877532556119778 - -&lt;BR /&gt;socket 106 response took 0.003s &amp;lt;response status="success" code="19"&amp;gt;&lt;BR /&gt;&amp;lt;completions&amp;gt;&lt;BR /&gt;&amp;lt;completion value="vsys1" vxpath="/config/devices/entry[@name='localhost.localdomain']/vsys/entry[@name='vsys1']" current="yes"/&amp;gt;&lt;BR /&gt;&amp;lt;/completions&amp;gt;&lt;BR /&gt;&amp;lt;/response&amp;gt;&lt;BR /&gt;[02-Sep-2023 21:00:43 Asia/Dhaka] [2023/09/02 21:00:43] &amp;#27;[41m panui_core\mgmt\MSConnection &amp;#27;[0m (DEBUG) 5877532556119778 - -&lt;BR /&gt;socket 40 sending request &amp;lt;request cmd="set" obj="/config/devices/entry[@name='localhost.localdomain']/vsys/entry[@name='vsys1']/address-group/entry[@name='01818090909']" cookie="5877532556119778" newonly="yes"&amp;gt;&lt;BR /&gt;&amp;lt;dynamic&amp;gt;&lt;BR /&gt;&amp;lt;filter&amp;gt;"Ubuntu"&amp;lt;/filter&amp;gt;&lt;BR /&gt;&amp;lt;/dynamic&amp;gt;&lt;BR /&gt;&amp;lt;/request&amp;gt;&lt;/P&gt;
&lt;P&gt;[02-Sep-2023 21:00:43 Asia/Dhaka] [2023/09/02 21:00:43] &amp;#27;[41m panui_core\mgmt\MSConnection &amp;#27;[0m (DEBUG) 5877532556119778 - -&lt;BR /&gt;socket 40 response took 0.054s &amp;lt;response status="success" code="20"&amp;gt;&lt;BR /&gt;&amp;lt;msg&amp;gt;command succeeded&amp;lt;/msg&amp;gt;&lt;BR /&gt;&amp;lt;/response&amp;gt;&lt;BR /&gt;Now I am trying to create an address group using the below command and it shows the Invalid credential msg again.&lt;BR /&gt;curl -k -X GET "https://a.b.c.d/api/?type=op&amp;amp;cmd=&amp;lt;request cmd="set" obj="/config/devices/entry[@name='localhost.localdomain']/vsys/entry[@name='vsys1']/address-group/entry[@name='01819810810']"newonly="yes"&amp;gt;&amp;lt;dynamic&amp;gt;&amp;lt;filter&amp;gt;"Ubuntu"&amp;lt;/filter&amp;gt;&amp;lt;/dynamic&amp;gt;&amp;lt;/request&amp;gt;&amp;amp;key=LUFRPT.............FqcQ=="&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Maybe I am missing something. I would appreciate it if you could help me with this. Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Sat, 02 Sep 2023 15:21:11 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/next-generation-firewall/response-status-error-code-403-while-using-api/m-p/556246#M1797</guid>
      <dc:creator>ssovee</dc:creator>
      <dc:date>2023-09-02T15:21:11Z</dc:date>
    </item>
  </channel>
</rss>

