<?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 Login through python in API / CLI Discussion</title>
    <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Login-through-python/m-p/99200#M5237</link>
    <description>&lt;P&gt;For some reason I am facing an issue using the login API through Python which works fine when using Postman:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;import requests&lt;/P&gt;&lt;P&gt;checkpoint_session = requests.session()&lt;BR /&gt;checkpoint_session .headers.update({r"Content-Type": r"application/json"})&lt;BR /&gt;checkpoint_session .post(r"https://&amp;lt;IP&amp;gt;/web_api/v1.1/login", verify=False, data={&lt;BR /&gt;"user": "&amp;lt;user&amp;gt;",&lt;BR /&gt;"password": "&amp;lt;password&amp;gt;"&lt;BR /&gt;})&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The return from the post request would be: "Login request message processing failed."&lt;/P&gt;&lt;P&gt;(The access settings is set to All IP addresses. And I run the script from the same machine that I run Postman.)&lt;/P&gt;&lt;P&gt;What could be the problem?&lt;/P&gt;</description>
    <pubDate>Thu, 15 Oct 2020 11:43:38 GMT</pubDate>
    <dc:creator>Divothy</dc:creator>
    <dc:date>2020-10-15T11:43:38Z</dc:date>
    <item>
      <title>Login through python</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Login-through-python/m-p/99200#M5237</link>
      <description>&lt;P&gt;For some reason I am facing an issue using the login API through Python which works fine when using Postman:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;import requests&lt;/P&gt;&lt;P&gt;checkpoint_session = requests.session()&lt;BR /&gt;checkpoint_session .headers.update({r"Content-Type": r"application/json"})&lt;BR /&gt;checkpoint_session .post(r"https://&amp;lt;IP&amp;gt;/web_api/v1.1/login", verify=False, data={&lt;BR /&gt;"user": "&amp;lt;user&amp;gt;",&lt;BR /&gt;"password": "&amp;lt;password&amp;gt;"&lt;BR /&gt;})&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The return from the post request would be: "Login request message processing failed."&lt;/P&gt;&lt;P&gt;(The access settings is set to All IP addresses. And I run the script from the same machine that I run Postman.)&lt;/P&gt;&lt;P&gt;What could be the problem?&lt;/P&gt;</description>
      <pubDate>Thu, 15 Oct 2020 11:43:38 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Login-through-python/m-p/99200#M5237</guid>
      <dc:creator>Divothy</dc:creator>
      <dc:date>2020-10-15T11:43:38Z</dc:date>
    </item>
    <item>
      <title>Re: Login through python</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Login-through-python/m-p/100080#M5259</link>
      <description>&lt;P&gt;This seems a malformed request&lt;/P&gt;&lt;P&gt;Try:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class="n"&gt;import json&lt;BR /&gt;payload={"user": "&amp;lt;user&amp;gt;","password": "&amp;lt;password&amp;gt;"}&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="p"&gt;checkpoint_session.post(r"https://&amp;lt;IP&amp;gt;/web_api/v1.1/login", verify=False, data=&lt;SPAN class="n"&gt;j&lt;/SPAN&gt;&lt;SPAN class="n"&gt;son&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;dumps&lt;/SPAN&gt;(&lt;SPAN class="n"&gt;payload&lt;/SPAN&gt;))&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 25 Oct 2020 12:07:32 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Login-through-python/m-p/100080#M5259</guid>
      <dc:creator>FraP</dc:creator>
      <dc:date>2020-10-25T12:07:32Z</dc:date>
    </item>
  </channel>
</rss>

