<?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 HTTP/1.1 400 Bad Request in API / CLI Discussion</title>
    <link>https://community.checkpoint.com/t5/API-CLI-Discussion/HTTP-1-1-400-Bad-Request/m-p/5233#M440</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am trying to login API with curl and want to send some commands to test at first glance. But stuck at login process, below is my command&amp;nbsp;that sent to server but server responses with 400 bad request.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;curl -k -XPOST "https://172.16.3.141/web_api/login" -d "{\"user\": \"myUser\", \"password\": \"myPassword-with-no-special-chars\"}" -H "Content-Type: application/json" -v‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Below you can see the checkpoint management server's response.&amp;nbsp;&lt;/P&gt;&lt;P&gt;* About to connect() to 172.16.3.141 port 443 (#0)&lt;BR /&gt;* Trying 172.16.3.141...&lt;BR /&gt;* connected&lt;BR /&gt;* Connected to 172.16.3.141 (172.16.3.141) port 443 (#0)&lt;BR /&gt;* SSLv3, TLS handshake, Client hello (1):&lt;BR /&gt;* SSLv3, TLS handshake, Server hello (2):&lt;BR /&gt;* SSLv3, TLS handshake, CERT (11):&lt;BR /&gt;* SSLv3, TLS handshake, Server key exchange (12):&lt;BR /&gt;* SSLv3, TLS handshake, Server finished (14):&lt;BR /&gt;* SSLv3, TLS handshake, Client key exchange (16):&lt;BR /&gt;* SSLv3, TLS change cipher, Client hello (1):&lt;BR /&gt;* SSLv3, TLS handshake, Finished (20):&lt;BR /&gt;* SSLv3, TLS handshake, Unknown (4):&lt;BR /&gt;* SSLv3, TLS change cipher, Client hello (1):&lt;BR /&gt;* SSLv3, TLS handshake, Finished (20):&lt;BR /&gt;* SSL connection using ECDHE-RSA-AES256-GCM-SHA384&lt;BR /&gt;* Server certificate:&lt;BR /&gt;* subject: L=Locality Name (eg, city); CN=172.16.3.141; emailAddress=Email Address; unstructuredName=An optional company name&lt;BR /&gt;* start date: 201&lt;BR /&gt;* expire date: 202&lt;BR /&gt;* common name: 172.16.3.141 (matched)&lt;BR /&gt;* issuer: L=L&lt;BR /&gt;* SSL certificate verify result: self signed certificate (18), continuing anyway.&lt;BR /&gt;&amp;gt; POST /web_api/login HTTP/1.1&lt;BR /&gt;&amp;gt; User-Agent: curl/7.27.0&lt;BR /&gt;&amp;gt; Host: 172.16.3.141&lt;BR /&gt;&amp;gt; Accept: */*&lt;BR /&gt;&amp;gt; Content-Type: application/json&lt;BR /&gt;&amp;gt; Content-Length: 41&lt;BR /&gt;&amp;gt; &lt;BR /&gt;* upload completely sent off: 41 out of 41 bytes&lt;BR /&gt;&amp;lt; HTTP/1.1 400 Bad Request&lt;BR /&gt;&amp;lt; Date: Mon, 14 Aug 2017 15:06:18 GMT&lt;BR /&gt;&amp;lt; Server: CPWS&lt;BR /&gt;&amp;lt; X-Frame-Options: SAMEORIGIN&lt;BR /&gt;&amp;lt; Content-Type: application/json&lt;BR /&gt;&amp;lt; X-UA-Compatible: IE=EmulateIE8&lt;BR /&gt;&amp;lt; X-Forwarded-Host-Port: 443&lt;BR /&gt;&amp;lt; Connection: close&lt;BR /&gt;&amp;lt; Transfer-Encoding: chunked&lt;BR /&gt;&amp;lt; &lt;BR /&gt;{&lt;BR /&gt; "code" : "err_login_failed",&lt;BR /&gt; "message" : "Authentication to server failed."&lt;BR /&gt;* Closing connection #0&lt;BR /&gt;* SSLv3, TLS alert, Client hello (1):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: I'v tried curl command both on a remote linux machine and also on checkpoint management/gateway machine. And also this is a trial licensed server if that matters.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 14 Aug 2017 14:39:57 GMT</pubDate>
    <dc:creator>Rasim_Caner_GUR</dc:creator>
    <dc:date>2017-08-14T14:39:57Z</dc:date>
    <item>
      <title>HTTP/1.1 400 Bad Request</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/HTTP-1-1-400-Bad-Request/m-p/5233#M440</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am trying to login API with curl and want to send some commands to test at first glance. But stuck at login process, below is my command&amp;nbsp;that sent to server but server responses with 400 bad request.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;curl -k -XPOST "https://172.16.3.141/web_api/login" -d "{\"user\": \"myUser\", \"password\": \"myPassword-with-no-special-chars\"}" -H "Content-Type: application/json" -v‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Below you can see the checkpoint management server's response.&amp;nbsp;&lt;/P&gt;&lt;P&gt;* About to connect() to 172.16.3.141 port 443 (#0)&lt;BR /&gt;* Trying 172.16.3.141...&lt;BR /&gt;* connected&lt;BR /&gt;* Connected to 172.16.3.141 (172.16.3.141) port 443 (#0)&lt;BR /&gt;* SSLv3, TLS handshake, Client hello (1):&lt;BR /&gt;* SSLv3, TLS handshake, Server hello (2):&lt;BR /&gt;* SSLv3, TLS handshake, CERT (11):&lt;BR /&gt;* SSLv3, TLS handshake, Server key exchange (12):&lt;BR /&gt;* SSLv3, TLS handshake, Server finished (14):&lt;BR /&gt;* SSLv3, TLS handshake, Client key exchange (16):&lt;BR /&gt;* SSLv3, TLS change cipher, Client hello (1):&lt;BR /&gt;* SSLv3, TLS handshake, Finished (20):&lt;BR /&gt;* SSLv3, TLS handshake, Unknown (4):&lt;BR /&gt;* SSLv3, TLS change cipher, Client hello (1):&lt;BR /&gt;* SSLv3, TLS handshake, Finished (20):&lt;BR /&gt;* SSL connection using ECDHE-RSA-AES256-GCM-SHA384&lt;BR /&gt;* Server certificate:&lt;BR /&gt;* subject: L=Locality Name (eg, city); CN=172.16.3.141; emailAddress=Email Address; unstructuredName=An optional company name&lt;BR /&gt;* start date: 201&lt;BR /&gt;* expire date: 202&lt;BR /&gt;* common name: 172.16.3.141 (matched)&lt;BR /&gt;* issuer: L=L&lt;BR /&gt;* SSL certificate verify result: self signed certificate (18), continuing anyway.&lt;BR /&gt;&amp;gt; POST /web_api/login HTTP/1.1&lt;BR /&gt;&amp;gt; User-Agent: curl/7.27.0&lt;BR /&gt;&amp;gt; Host: 172.16.3.141&lt;BR /&gt;&amp;gt; Accept: */*&lt;BR /&gt;&amp;gt; Content-Type: application/json&lt;BR /&gt;&amp;gt; Content-Length: 41&lt;BR /&gt;&amp;gt; &lt;BR /&gt;* upload completely sent off: 41 out of 41 bytes&lt;BR /&gt;&amp;lt; HTTP/1.1 400 Bad Request&lt;BR /&gt;&amp;lt; Date: Mon, 14 Aug 2017 15:06:18 GMT&lt;BR /&gt;&amp;lt; Server: CPWS&lt;BR /&gt;&amp;lt; X-Frame-Options: SAMEORIGIN&lt;BR /&gt;&amp;lt; Content-Type: application/json&lt;BR /&gt;&amp;lt; X-UA-Compatible: IE=EmulateIE8&lt;BR /&gt;&amp;lt; X-Forwarded-Host-Port: 443&lt;BR /&gt;&amp;lt; Connection: close&lt;BR /&gt;&amp;lt; Transfer-Encoding: chunked&lt;BR /&gt;&amp;lt; &lt;BR /&gt;{&lt;BR /&gt; "code" : "err_login_failed",&lt;BR /&gt; "message" : "Authentication to server failed."&lt;BR /&gt;* Closing connection #0&lt;BR /&gt;* SSLv3, TLS alert, Client hello (1):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: I'v tried curl command both on a remote linux machine and also on checkpoint management/gateway machine. And also this is a trial licensed server if that matters.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Aug 2017 14:39:57 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/HTTP-1-1-400-Bad-Request/m-p/5233#M440</guid>
      <dc:creator>Rasim_Caner_GUR</dc:creator>
      <dc:date>2017-08-14T14:39:57Z</dc:date>
    </item>
    <item>
      <title>Re: HTTP/1.1 400 Bad Request</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/HTTP-1-1-400-Bad-Request/m-p/5234#M441</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you enabled the management server to accept connections from your IP address?&amp;nbsp;&lt;/P&gt;&lt;P&gt;By default, it only accepts connections from the management server only.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.checkpoint.com/legacyfs/online/checkpoint/57940_pastedImage_2.png" style="width: 620px; height: 387px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Aug 2017 15:40:07 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/HTTP-1-1-400-Bad-Request/m-p/5234#M441</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2017-08-14T15:40:07Z</dc:date>
    </item>
  </channel>
</rss>

