<?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: How to grant permission for the web api? in API / CLI Discussion</title>
    <link>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-grant-permission-for-the-web-api/m-p/115406#M5760</link>
    <description>&lt;P&gt;Api status: started&lt;/P&gt;</description>
    <pubDate>Tue, 06 Apr 2021 15:30:10 GMT</pubDate>
    <dc:creator>ottis79</dc:creator>
    <dc:date>2021-04-06T15:30:10Z</dc:date>
    <item>
      <title>How to grant permission for the web api?</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-grant-permission-for-the-web-api/m-p/54403#M3519</link>
      <description>&lt;P&gt;I just install the Check Point API Python Development Kit and run a simple login. But it says "You don't have permission to access /web_api/login this server.&lt;/P&gt;&lt;P&gt;How could I troubleshoot the issue?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Code:&lt;/P&gt;&lt;P&gt;import getpass&lt;BR /&gt;from cpapi import APIClient, APIClientArgs&lt;/P&gt;&lt;P&gt;api_server = "fwmgr"&lt;BR /&gt;username = input("Enter username: ")&lt;BR /&gt;password = getpass.getpass("Enter password: ")&lt;/P&gt;&lt;P&gt;client_args = APIClientArgs(server=api_server)&lt;BR /&gt;client = APIClient(client_args)&lt;/P&gt;&lt;P&gt;client.debug_file = "api_calls.json"&lt;BR /&gt;login_res = client.login(username, password)&lt;BR /&gt;login_res.error_message&lt;/P&gt;&lt;P&gt;Error message returned:&lt;/P&gt;&lt;PRE&gt;cpapi.api_exceptions.APIException('APIResponse received a response which is not a valid JSON.',
                                  b'&amp;lt;!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"&amp;gt;\n&amp;lt;html&amp;gt;&amp;lt;head&amp;gt;\n&amp;lt;title&amp;gt;403 Forbidden&amp;lt;/title&amp;gt;\n&amp;lt;/head&amp;gt;&amp;lt;body&amp;gt;\n&amp;lt;h1&amp;gt;Forbidden&amp;lt;/h1&amp;gt;\n&amp;lt;p&amp;gt;You don\'t have permission to access /web_api/login\non this server.&amp;lt;br /&amp;gt;\n&amp;lt;/p&amp;gt;\n&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;\n')&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 May 2019 08:32:13 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-grant-permission-for-the-web-api/m-p/54403#M3519</guid>
      <dc:creator>Albert_Chang</dc:creator>
      <dc:date>2019-05-27T08:32:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to grant permission for the web api?</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-grant-permission-for-the-web-api/m-p/54467#M3520</link>
      <description>Check API access setting is the SmartConsole, try -all IP addresses</description>
      <pubDate>Mon, 27 May 2019 15:29:38 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-grant-permission-for-the-web-api/m-p/54467#M3520</guid>
      <dc:creator>Martin_Raska</dc:creator>
      <dc:date>2019-05-27T15:29:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to grant permission for the web api?</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-grant-permission-for-the-web-api/m-p/54480#M3522</link>
      <description>&lt;P&gt;&lt;A href="https://community.checkpoint.com/t5/API-CLI-Discussion-and-Samples/Enabling-web-api/m-p/32641#M2011" target="_blank"&gt;https://community.checkpoint.com/t5/API-CLI-Discussion-and-Samples/Enabling-web-api/m-p/32641#M2011&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 28 May 2019 04:02:50 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-grant-permission-for-the-web-api/m-p/54480#M3522</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2019-05-28T04:02:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to grant permission for the web api?</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-grant-permission-for-the-web-api/m-p/54485#M3523</link>
      <description>Hi Martin,&lt;BR /&gt;&lt;BR /&gt;Do you mean to configure an access control rule for API access? Do you have an example?&lt;BR /&gt;&lt;BR /&gt;We already enabled SSH 443 to the firewall manager. Do we need to enable anything else?</description>
      <pubDate>Tue, 28 May 2019 04:31:03 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-grant-permission-for-the-web-api/m-p/54485#M3523</guid>
      <dc:creator>Albert_Chang</dc:creator>
      <dc:date>2019-05-28T04:31:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to grant permission for the web api?</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-grant-permission-for-the-web-api/m-p/54486#M3524</link>
      <description>Thanks for the reply, PhoneBoy.&lt;BR /&gt;&lt;BR /&gt;Thanks PhoneBoy for the reply.&lt;BR /&gt;I am using the Check Point API Python Development Kit for Python. So I don't need to specify "web_api" string in the url.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://github.com/CheckPointSW/cp_mgmt_api_python_sdk" target="_blank"&gt;https://github.com/CheckPointSW/cp_mgmt_api_python_sdk&lt;/A&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 28 May 2019 04:34:51 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-grant-permission-for-the-web-api/m-p/54486#M3524</guid>
      <dc:creator>Albert_Chang</dc:creator>
      <dc:date>2019-05-28T04:34:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to grant permission for the web api?</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-grant-permission-for-the-web-api/m-p/54733#M3534</link>
      <description>The reason you are seeing the error is the API server is only available from 127.0.0.1 (localhost) by default.&lt;BR /&gt;To fix this, see: &lt;A href="https://community.checkpoint.com/t5/API-CLI-Discussion-and-Samples/Enabling-web-api/m-p/32641#M2011" target="_blank"&gt;https://community.checkpoint.com/t5/API-CLI-Discussion-and-Samples/Enabling-web-api/m-p/32641#M2011&lt;/A&gt;</description>
      <pubDate>Thu, 30 May 2019 13:24:03 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-grant-permission-for-the-web-api/m-p/54733#M3534</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2019-05-30T13:24:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to grant permission for the web api?</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-grant-permission-for-the-web-api/m-p/115387#M5756</link>
      <description>&lt;P&gt;Hi PhoneBoy&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I' have the same problem:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN&gt;body&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN&gt;h1&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;Forbidden&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN&gt;h1&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN&gt;p&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;You&amp;nbsp;don't&amp;nbsp;have&amp;nbsp;permission&amp;nbsp;to&amp;nbsp;access&amp;nbsp;/web_api/login&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;on&amp;nbsp;this&amp;nbsp;server.&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN&gt;br&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;/&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN&gt;p&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN&gt;body&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I'm tring to enablr the api by mgmt cli:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;login:&amp;nbsp;admin&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;Password:&lt;BR /&gt;Last&amp;nbsp;login:&amp;nbsp;Tue&amp;nbsp;Apr&amp;nbsp;&amp;nbsp;6&amp;nbsp;15:28:58&amp;nbsp;on&amp;nbsp;pts/2&lt;BR /&gt;gw-6825d9&amp;gt;&amp;nbsp;mgmt&amp;nbsp;login&amp;nbsp;user&amp;nbsp;admin&amp;nbsp;password&amp;nbsp;xxxx domain&amp;nbsp;"MDS"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;and then&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;BR /&gt;gw-6825d9&amp;gt;&amp;nbsp;mgmt_cli&amp;nbsp;-r&amp;nbsp;true&amp;nbsp;set&amp;nbsp;api-settings&amp;nbsp;accepted-api-calls-from&amp;nbsp;"All&amp;nbsp;IP&amp;nbsp;Add&lt;BR /&gt;resses"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;but I have the 403 error have you a suggestion to activate api?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;thanks&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Ottavio&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 06 Apr 2021 13:37:16 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-grant-permission-for-the-web-api/m-p/115387#M5756</guid>
      <dc:creator>ottis79</dc:creator>
      <dc:date>2021-04-06T13:37:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to grant permission for the web api?</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-grant-permission-for-the-web-api/m-p/115391#M5757</link>
      <description>&lt;P&gt;You haven't restarted the API server?&lt;/P&gt;</description>
      <pubDate>Tue, 06 Apr 2021 14:32:29 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-grant-permission-for-the-web-api/m-p/115391#M5757</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2021-04-06T14:32:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to grant permission for the web api?</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-grant-permission-for-the-web-api/m-p/115392#M5758</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks for you reply, Yes I do, with the command:&lt;/P&gt;&lt;P&gt;api restart&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Apr 2021 14:38:06 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-grant-permission-for-the-web-api/m-p/115392#M5758</guid>
      <dc:creator>ottis79</dc:creator>
      <dc:date>2021-04-06T14:38:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to grant permission for the web api?</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-grant-permission-for-the-web-api/m-p/115404#M5759</link>
      <description>&lt;P&gt;What does api status say?&lt;/P&gt;</description>
      <pubDate>Tue, 06 Apr 2021 15:24:52 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-grant-permission-for-the-web-api/m-p/115404#M5759</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2021-04-06T15:24:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to grant permission for the web api?</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-grant-permission-for-the-web-api/m-p/115406#M5760</link>
      <description>&lt;P&gt;Api status: started&lt;/P&gt;</description>
      <pubDate>Tue, 06 Apr 2021 15:30:10 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-grant-permission-for-the-web-api/m-p/115406#M5760</guid>
      <dc:creator>ottis79</dc:creator>
      <dc:date>2021-04-06T15:30:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to grant permission for the web api?</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-grant-permission-for-the-web-api/m-p/115409#M5761</link>
      <description>&lt;P&gt;What precise IP are you connecting to here?&lt;BR /&gt;It should be the the CMA/Domain IP.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Apr 2021 15:50:35 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-grant-permission-for-the-web-api/m-p/115409#M5761</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2021-04-06T15:50:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to grant permission for the web api?</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-grant-permission-for-the-web-api/m-p/115411#M5762</link>
      <description>&lt;P&gt;My R80 ip is&amp;nbsp;&lt;A href="https://192.0.2.80," target="_blank"&gt;https://192.0.2.80,&lt;/A&gt;&amp;nbsp;I'm tring to connect from 192.0.2.81&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Apr 2021 15:57:33 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-grant-permission-for-the-web-api/m-p/115411#M5762</guid>
      <dc:creator>ottis79</dc:creator>
      <dc:date>2021-04-06T15:57:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to grant permission for the web api?</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-grant-permission-for-the-web-api/m-p/115412#M5763</link>
      <description>&lt;P&gt;You're either not connecting to the correct IP or there's an issue the TAC probably needs to assist you with.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Apr 2021 16:03:08 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-grant-permission-for-the-web-api/m-p/115412#M5763</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2021-04-06T16:03:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to grant permission for the web api?</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-grant-permission-for-the-web-api/m-p/115413#M5764</link>
      <description>&lt;P&gt;Hi PhoneBoy&lt;/P&gt;&lt;P&gt;I think the ip is correct because I have a 403 error from R80, I'm not sure that with mgmt_cli I enabled the api to accept all ip addresses. It is possibile from gui to check the configuration?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Ottavio&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Apr 2021 16:07:42 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-grant-permission-for-the-web-api/m-p/115413#M5764</guid>
      <dc:creator>ottis79</dc:creator>
      <dc:date>2021-04-06T16:07:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to grant permission for the web api?</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-grant-permission-for-the-web-api/m-p/115415#M5765</link>
      <description>&lt;P&gt;SmartConsole will only give you the status of the flag&lt;BR /&gt;It won't give you the full details, which api status will give you.&lt;BR /&gt;If you're still having issues, you may want to review the file created by api status -s.&lt;BR /&gt;And, like I said, a TAC case may be in order.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Apr 2021 16:26:57 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-grant-permission-for-the-web-api/m-p/115415#M5765</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2021-04-06T16:26:57Z</dc:date>
    </item>
  </channel>
</rss>

