title: Accessing JWT secured Restful API from python script
body: <p>I can access JWT secured Restful API using curl command as follows</p>
  <pre><code>#Get the access Token in a variable ID
  
  export ID=`curl  -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{  &quot;password&quot;: &quot;admin&quot;,  &quot;rememberMe&quot;: true,  &quot;username&quot;: &quot;admin&quot;  }' 'http://localhost:8080/api/authenticate' | jq -r .id_token`
  
  #Use this token to access endpoint 
  
  curl 'http://localhost:8080/api/downloads' --header 'Content-Type: application/json' --header 'Accept: application/json' --header &quot;Authorization: Bearer $ID&quot; 
  
  </code></pre>
  <p>My python script for authentication part and get bearer token is as follows:</p>
  <pre><code>import requests
  
  LOGIN_URL = &quot;http://localhost:8080/api/authenticate&quot;
  ENDPOINT_URL = 'http://localhost:8080/api/downloads'
  PARAMS = {'password': 'admin','rememberMe': True,  'username': 'admin'  }
  r1 = requests.post(LOGIN_URL,  data =PARAMS, headers={&quot;Content-Type&quot;: &quot;application/json&quot;,&quot;Accept&quot;: &quot;application/json&quot;})
  print(r1)
  </code></pre>
  <p>When i am trying to do the same through python script,Authentication request fails with message &lt;Response [400]&gt;</p>
  <p>Help needed !</p>