title: Using Curl need to call a REST API
body: <p>I am trying to generate a file using REST API by Header authorization &quot;Bearer Token&quot; and password encryption.</p>
  <pre class="lang-sh prettyprint-override"><code>token=$(curl --header &quot;Content-Type: application/json&quot; --header &quot;aesiv: xxxxxxxx&quot; \
    --request POST \
    --data '{&quot;login&quot;:&quot;username&quot;,&quot;password&quot;:&quot;encrypted_pswd&quot;}' \
    https://ssssss/api/login)
  </code></pre>
  <pre><code>curl -X GET https://ssssss/api/generate-report -H &quot;Accept: encryptionIntVeD&quot; &quot;Authorization: aesiv {xxxxxxxxxxx}&quot; -H &quot;Accept: application/json&quot; -H &quot;Authorization: Bearer {token}&quot;
  </code></pre>
  <p>File not getting generated, can anyone guide me where I am stuck.</p>